Releasing an ApplicationSet release¶
The ApplicationSet controller release process and scripts are based on the process/scripts used by the Argo CD Image Updater, a sibling project in the Argo Labs organization.
1) Create a release branch based on the desired source branch¶
# Ensure you have the latest copy of source branch (in this case, master) git remote add upstream firstname.lastname@example.org:argoproj-labs/applicationset # Use a different upstream here for testing purposes git fetch upstream git checkout master git reset --hard upstream/master # Create a new branch based on master git checkout -b "release-(VERSION)" # Example: git checkout -b "release-0.1.0" # Branch name must begin with 'release-'
2) Ensure the commits on the branch match what is expected¶
git status git log
3) Verify that the GitHub action jobs fully passed for the commit¶
Verify there is a green check mark at the top left hand corner, indicating that each of the jobs of the GitHub action successfully passed. If not, you should be able to click the icon to see what failed.
4) Run the
From the repository root:
CONTAINER_REGISTRY=quay.io ./release.sh (VERSION) # Example: CONTAINER_REGISTRY=quay.io ./release.sh 0.1.0
The release script will (as of this writing):
- Perform some simple sanity checks
VERSIONfile at repository root to match the specified version parameter
controller-gento regenerate the CRDs
generate-manifests.shto regenerate the
- Create a git commit including the above changes
- Build and tag the docker image (but not push it)
5) Push the tagged commit to the target remote¶
Push the tagged commit to the target remote. The
release.sh script should have output the command to run during the previous step.
git push upstream (RELEASE_BRANCH) (TARGET_TAG)
6) Verify that the test results are green for the pushed commit¶
https://github.com/argoproj-labs/applicationset/commit/(COMMIT ID) where COMMIT ID is the next commit. Wait for the GitHub actions to complete succesfully.
7) Push the container image to the target container registry¶
Push the built container image to the container registry. The
release.sh script should have output the command to run during the previous steps.
docker login (container registry) # Example: docker login quay.io # Username: myusername # Password: mypassword make CONTAINER_REGISTRY='quay.io' IMAGE_TAG='(VERSION)' image-push # Example: make CONTAINER_REGISTRY='quay.io' IMAGE_TAG='v0.1.0' image-push
8) Create the release within the GitHub UI¶
Create a release based on the release tag. Add the release notes to the release.
master branch, update the version artifacts for the next release¶
git checkout master
Increment the version in the VERSION file:
- For example, if the
0.1.0, it should be bumped up to
make manifests. This will regenerate:
Commit the changes:
git commit -s -m "Increment version for next release" VERSION manifests/
Finally, push the branch and open up a PR for the change.
To perform a dry run of the release process, use your own Git repository and Quay.io account. Follow the above steps, but substitute the following:
- Use an upstream remote that is hosted in your own repository, rather than the argoproj-lab:
git remote add upstream email@example.com:(your-username)/applicationset
- Run release.sh with your own image namespace:
CONTAINER_REGISTRY=quay.io IMAGE_NAMESPACE=(your-quay.io-usename) ./hack/release.sh (version)
CONTAINER_REGISTRY=quay.io IMAGE_NAMESPACE=jgwest-redhat ./hack/release.sh 0.1.0
git push upstream (RELEASE_BRANCH) (TARGET_TAG)as above
- Specify the same
IMAGE_NAMESPACEvalues when calling
make IMAGE_NAMESPACE=(your-quay.io-usename) CONTAINER_REGISTRY='quay.io' IMAGE_TAG='(version)' image-push
make IMAGE_NAMESPACE=jgwest-redhat CONTAINER_REGISTRY='quay.io' IMAGE_TAG='v0.1.0' image-push
To clean up after a dry run, delete your local branch and tag:
git branch -D release-0.1.0 git tag -d v0.1.0
Then within the GitHub UI, on your own repository:
- WARNING: Be very careful you don't delete a release from the main project source repo
- Delete release from GitHub UI
- Delete tag from GitHub UI
- Delete branch
release-(version)branch from GitHub UI
- Delete tag from quay.io UI