github.com/argoproj/argo-cd@v1.8.7/docs/developer-guide/releasing.md (about) 1 # Releasing 2 3 ## Automated release procedure 4 5 Starting from `release-1.6` branch, ArgoCD can be released in an automated fashion 6 using GitHub actions. The release process takes about 20 minutes, sometimes a 7 little less, depending on the performance of GitHub Actions runners. 8 9 The target release branch must already exist in the GitHub repository. If you for 10 example want to create a release `v1.7.0`, the corresponding release branch 11 `release-1.7` needs to exist, otherwise, the release cannot be built. Also, 12 the trigger tag should always be created in the release branch, checked out 13 in your local repository clone. 14 15 Before triggering the release automation, the `CHANGELOG.md` should be updated 16 with the latest information, and this change should be committed and pushed to 17 the GitHub repository to the release branch. Afterward, the automation can be 18 triggered. 19 20 **Manual steps before release creation:** 21 22 * Update `CHANGELOG.md` with changes for this release 23 * Commit & push changes to `CHANGELOG.md` 24 * Prepare release notes (save to some file, or copy from Changelog) 25 26 **The automation will perform the following steps:** 27 28 * Update `VERSION` file in the release branch 29 * Update manifests with image tags of the new version in the release branch 30 * Build the Docker image and push to Docker Hub 31 * Create a release tag in the GitHub repository 32 * Create a GitHub release and attach the required assets to it (CLI binaries, ...) 33 34 Finally, it will the remove trigger tag from the repository again. 35 36 Automation supports both, GA and pre-releases. The automation is triggered by 37 pushing a tag to the repository. The tag must be in one of the following formats 38 to trigger the GH workflow: 39 40 * GA: `release-v<MAJOR>.<MINOR>.<PATCH>` 41 * Pre-release: `release-v<MAJOR>.<MINOR>.<PATCH>-rc<RC#>` 42 43 The tag must be an annotated tag, and it must contain the release notes in the 44 commit message. Please note that Markdown uses `#` character for formatting, but 45 Git uses it as comment char. To solve this, temporarily switch Git's comment char 46 to something else, the `;` character is recommended. 47 48 For example, consider you have configured the Git remote for the repository to 49 `github.com/argoproj/argo-cd` to be named `upstream` and are in your locally 50 checked out repo: 51 52 ```shell 53 git config core.commentChar ';' 54 git tag -a -F /path/to/release-notes.txt release-v1.6.0-rc2 55 git push upstream release-v1.6.0-rc2 56 git tag -d release-v1.6.0-rc2 57 git config core.commentChar '#' 58 59 ``` 60 61 For convenience, there is a shell script in the tree that ensures all the 62 pre-requisites are met and that the trigger is well-formed before pushing 63 it to the GitHub repo. 64 65 In summary, the modifications it does are: 66 67 * Create annotated trigger tag in your local repository 68 * Push the tag to the GitHub repository to trigger the workflow 69 * Remove trigger tag from your local repository 70 71 The script can be found at `hacks/trigger-release.sh` and is used as follows: 72 73 ```shell 74 ./hacks/trigger-release.sh <version> <remote name> [<release notes path>] 75 ``` 76 77 The `<version>` identifier needs to be specified **without** the `release-` 78 prefix, so just specify it as `v1.6.0-rc2` for example. The `<remote name>` 79 specifies the name of the remote used to push to the GitHub repository. 80 81 If you omit the `<release notes path>`, an editor will pop-up asking you to 82 enter the tag's annotation so you can paste the release notes, save, and exit. 83 It will also take care of temporarily configuring the `core.commentChar` and 84 setting it back to its original state. 85 86 :warning: 87 It is strongly recommended to use this script to trigger the workflow 88 instead of manually pushing a tag to the repository. 89 90 Once the trigger tag is pushed to the repo, the GitHub workflow will start 91 execution. You can follow its progress under the `Actions` tab, the name of the 92 action is `Create release`. Don't get confused by the name of the running 93 workflow, it will be the commit message of the latest commit to the `master` 94 branch, this is a limitation of GH actions. 95 96 The workflow performs necessary checks so that the release can be successfully 97 built before the build actually starts. It will error when one of the 98 prerequisites is not met, or if the release cannot be built (i.e. already 99 exists, release notes invalid, etc etc). You can see a summary of what has 100 failed in the job's overview page and more detailed errors in the output 101 of the step that has failed. 102 103 :warning: 104 You cannot perform more than one release on the same release branch at the 105 same time. For example, both `v1.6.0` and `v1.6.1` would operate on the 106 `release-1.6` branch. If you submit `v1.6.1` while `v1.6.0` is still 107 executing, the release automation will not execute. You have to either 108 cancel `v1.6.0` before submitting `v1.6.1` or wait until it has finished. 109 You can execute releases on different release branches simultaneously, for 110 example, `v1.6.0` and `v1.7.0-rc1`, without problems. 111 112 ### Verifying automated release 113 114 After the automatic release creation has finished, you should perform manual 115 checks to see if the release came out correctly: 116 117 * Check status & output of the GitHub action 118 * Check [https://github.com/argoproj/argo-cd/releases](https://github.com/argoproj/argo-cd/releases) 119 to see if the release has been correctly created and if all required assets 120 are attached. 121 * Check whether the image has been published on DockerHub correctly 122 123 ### If something went wrong 124 125 If something went wrong, damage should be limited. Depending on the steps that 126 have been performed, you will need to manually clean up. 127 128 * Delete the release tag (e.g. `v1.6.0-rc2`) created in the GitHub repository. This 129 will immediately set the release (if created) to `draft` status, invisible to the 130 general public. 131 * Delete the draft release (if created) from the `Releases` page on GitHub 132 * If Docker image has been pushed to DockerHub, delete it 133 * If commits have been performed to the release branch, revert them. Paths that could have been committed to are: 134 * `VERSION` 135 * `manifests/*` 136 137 ### Post-process manual steps 138 139 For now, the only manual steps left are to 140 141 * update stable tag in the GitHub repository to point to new the release (if appropriate) 142 * update the `VERSION` file on `master` if this is a new major release 143 144 These may be automated as well in the future. 145 146 ## Manual releasing 147 148 The automatic release process does not interfere with the manual release process, since 149 the trigger tag does not match a normal release tag. If you prefer to perform, 150 manual release or if automatic release is for some reason broken, these are the 151 steps: 152 153 Make sure you are logged into Docker Hub: 154 155 ```bash 156 docker login 157 ``` 158 159 Export the upstream repository and branch name, e.g.: 160 161 ```bash 162 REPO=upstream ;# or origin 163 BRANCH=release-1.3 164 ``` 165 166 Set the `VERSION` environment variable: 167 168 ```bash 169 # release candidate 170 VERSION=v1.3.0-rc1 171 # GA release 172 VERSION=v1.3.1 173 ``` 174 175 Update `VERSION` and manifests with the new version: 176 177 ```bash 178 git checkout $BRANCH 179 echo ${VERSION:1} > VERSION 180 make dev-tools-image 181 make manifests IMAGE_TAG=$VERSION 182 git commit -am "Update manifests to $VERSION" 183 git tag $VERSION 184 ``` 185 186 Build, and push release to Docker Hub 187 188 ```bash 189 git clean -fd 190 make release IMAGE_NAMESPACE=argoproj IMAGE_TAG=$VERSION DOCKER_PUSH=true 191 git push $REPO $BRANCH 192 git push $REPO $VERSION 193 ``` 194 195 Update [GitHub releases](https://github.com/argoproj/argo-cd/releases) with: 196 197 * Getting started (copy from the previous release) 198 * Changelog 199 * Binaries (e.g. `dist/argocd-darwin-amd64`). 200 201 ## Update brew formulae (manual) 202 203 If GA, update the Brew formula: 204 205 ```bash 206 brew bump-formula-pr argocd --version ${VERSION:1} 207 ``` 208 209 ## Update stable tag (manual) 210 211 If GA, update `stable` tag: 212 213 ```bash 214 git tag stable --force && git push $REPO stable --force 215 ``` 216 217 ## Verify release 218 219 Locally: 220 221 ```bash 222 kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$VERSION/manifests/install.yaml 223 ``` 224 225 Follow the [Getting Started Guide](../getting_started/). 226 227 If GA: 228 229 ```bash 230 brew upgrade argocd 231 /usr/local/bin/argocd version 232 ``` 233 234 Sync Argo CD in [https://cd.apps.argoproj.io/applications/argo-cd](https://cd.apps.argoproj.io/applications/argo-cd). 235 236 Deploy the [site](site.md).