Commit 83063d7
authored
ci: [NGOv2.X] Automation of NGO releases (#3602)
## Purpose of this PR
This PR automates the releases of NGO package (which can be extended for
other packages since it's quite modular). The job will operate on the
branch from which it will be triggered and by default it will be on the
`develop` branch (job trigger).
For more background note that Netcode team sprint last 4 weeks, starting
and ending on Wednesday and our goal is to kickstart the release process
after last full week of the sprint and preferably release until next
Wednesday (end of the sprint). So the goal would be to run everything on
Saturday (after the week concluded) and have everything ready from
Monday morning to Playtest/investigate failures.
As a separate part of this automation, as per **[THIS
PR](#3557
we are able to trigger builds of our samples so those will also be
triggered on the weekend to be ready for playtesting on Monday.
Now with this in mind the process will work in the following way:
1. It runs on weekly schedule but we are interesting on executing it
every 4th Saturday (after last full week of the Netcode team sprint. Our
sprint last 4 weeks). Because of that the first action that this job
will do is to run a check to see if the following requirements are
satisfied:
- Is this the 4th Saturday since we last released?
- Is NGO CHANGELOG not empty? (no point of making the release is there
is nothing to release)
- Is the release branch not yet created?
Before looking at the next steps, please note that as per **[THIS
PR](#3549
the package version of Nshould always correspond to the current state of
the package.
2. If the above is satisfied the next step will be to create the release
branch (based on the known package version). The already existing
**release.py** script will be executed there in order to regenerate
recipes, cleanup changelog and generally prepare our package for
releasing (see result
**[HERE](c9f3f204fc4058df8781dd577b187a117216b544)**)
3. The next step will be to trigger
`all_promotion_related_jobs_promotiontrigger` job. In that way when we
will set-up packageworks release stream on Monday morning we will
already have the results from this job and we can address any potential
failures.
4. As a last step the job will create a commit to the local branch
(normally `develop` but for the sake of playtesting I used a test
branch). The goal with changelog here is we want to avoid changelog
divergence if release will take longer then expected. The script will
clean the empty sections, assign correct release version and date and
then add back the [Unreleased] section template for the purpose of next
entries.
The goal with package version is that we want to indicate that now the
package reflects further state (next patch). After this the job will
commit this to the branch.
I created Netcode-Team-Bot with appropriate tokens and marked committer
to point to the bot (when for example making a direct commit to
`develop` with changelog and package version update)
<img width="1782" height="292" alt="image"
src="https://github.com/user-attachments/assets/81e76d5a-b8f3-48f2-985f-40126e6511b8"
/>
The bot will make commits like
<img width="1804" height="164" alt="image"
src="https://github.com/user-attachments/assets/728eb89c-2c59-4b81-8a7e-7f858470b979"
/>
## Jira ticket
https://jira.unity3d.com/browse/MTT-12841
## Documentation
After this gets merged I will add approperiate description of Netcode
release process in
https://docs.google.com/document/d/16g9B5jxXeV0zG44Fhax-6Md_gtLoqGVthKQ7LkDvdqM/edit?tab=t.0#heading=h.t1guku6agyev
## Testing & QA
Since this automation runs on the same branch on which it's triggered
(and just because of job trigger it will be `develop-2.0.0` branch) I
tested it locally (each script) and entire automation was tested on
`testing-automated-netcode-releases` branch, the effects of which you
can see as follows (note that instead of `develop-2.0.0` I just used
local branch):
1. I tested for the normal release schedule date (result
**[HERE](https://unity-ci.cds.internal.unity3d.com/job/56127622)**)
2. I tested with empty changelog (result
**[HERE](https://unity-ci.cds.internal.unity3d.com/job/56123485)**)
3. The job itself was green
(**[LINK](https://unity-ci.cds.internal.unity3d.com/job/56127745)**).
4. `release/2.5.1` branch was created with proper initial setup
(**[LINK](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/tree/release/2.5.1)**),
see latest commits there
5. Changelog and package versions were updated on `develop-2.0.0` branch
(replaced for testing with `testing-automated-netcode-releases`). Notice
that this simulates what will happen on develop branch after this script
runs.
(**[LINK](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/tree/testing-automated-netcode-releases-2.x)**)
6. Wrench jobs were correctly triggered on the created release branch
(**[LINK](https://unity-ci.cds.internal.unity3d.com/project/1201/branch/release%2F2.5.1/jobDefinition/.yamato%2Fwrench%2Fpromotion-jobs.yml%23publish_dry_run_netcode_gameobjects/recent-jobs?nav=none)**)
7. Builds were triggered from release branch (**[example build
LINK](https://unity-ci.cds.internal.unity3d.com/project/1201/branch/release%2F2.5.1/jobDefinition/.yamato%2Fproject-builders%2Fproject-builders.yml%23build_BossRoom_project/recent-jobs?nav=jobDefinitions)**)
## Things to note
- Updating package version to next patch won't be immediately valid
(vetting test will still compare it to latest released package version)
but it serves the purpose of automating those steps and not needing to
remember about it after package is released
- **[email protected]** was created to assign
NETCODE_YAMATO_API_KEY to it. Additionally I created tokens for both
GitHubs and when making commit I'm just pointing to this bot as
committer and author.
## Backports
It's backported to
#36031 parent 12f3c79 commit 83063d7
File tree
10 files changed
+812
-78
lines changed- .yamato
- Tools/scripts
- ReleaseAutomation
- Utils
10 files changed
+812
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments