Provide capability to release-tools to tag and/or send versions to CNG
Problem
As we move infrastructure components into Kubernetes, we need to ensure that our auto-deploy mechanism is also sending the appropriate build information to the CNG project. Doing so will allow us to build the necessary components for Kubernetes and omnibus at the same time, with the end goal that we can trigger a deploy to both our omnibus and Kubernetes infrastructures at near the same time.
Things to Consider
- find versions of all components
- We already do this for our omnibus deployment, however we are missing the Mailroom component - this will need to be added, otherwise we may accidentally build the wrong version of that component
- commit version changes to CNG - this could be accomplished similar to omnibus, however, there are some differences:
- CNG uses a central file to contain all variables instead of one file for each component like omnibus does today
- versions differ a bit, CNG requires proper tags for all GitLab components, in these cases, our versions coming out of Canonical GitLab are missing the
v
in their tags (omnibus does not require proper tags) - The mailroom version needs to be sent to CNG (without the
v
in it's semver)
- Send the tag to CNG
- Here we introduce a new problem, our tagging mechanism is very straightforward and looks at the commit coming from the omnibus project to easily construct the name of the tag
12.7.<timestamp>+<gitlab sha>.<omnibus sha>
- simply copying the methods that would do the same would provide us with a new tag
12.7.<timestamp>+<gitlab sha>.<cng sha>
- As discussed here: #577 (comment 265956565), we'd like to ensure that we re-utilize the omnibus sha, and potentially revisit our auto-deploy tag at a later time: #613
- Here we introduce a new problem, our tagging mechanism is very straightforward and looks at the commit coming from the omnibus project to easily construct the name of the tag
- We also need to know when to tag:
- Changes to
gitlab-ee
will always introduce a need to create a tag in CNG and Omnibus - we always want to build the latest version of gitlab - Changes to
omnibus-gitlab
- trigger a new tag as done already, with no tagging to CNG - Changes to
CNG
- trigger a new tag on the CNG repo
- Changes to
How to Solve
-
We'll need new methods to find and populate our existing version_map with the mailroom component - gitlab-org/release-tools!836 (merged) - gitlab-org/release-tools!851 (merged) -
Potentially utilize similar methods to commit to both omnibus and CNG at near the same time - gitlab-org/release-tools!841 (merged) -
Use similar methods to tag both omnibus and CNG, but using the tag name from omnibus and repeat in CNG as discussed here: #577 (comment 265956565) - This will be completed in issue #695 (closed)
Edited by John Skarbek