Record official build number as separate variable #11071
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
We are adding the Jenkins build number to version.Current for beta/rc builds. This conflicts with the original intent of the Build attribute, which was to track non-official juju builds. And we were incorrectly zeroing out the Build value when making the SharedToolsDir (where the agents are unpacked to), which screws upgrades and causes other unitended issues.
This PR reverts the version.Build semantics to what it was originally, and introduces a new OfficialBuild variable to the juju/version package - this is what is set by the Jenkins build process and what is used to compute the jujud oci image path, rather than trying to overload the use of Build.
QA steps
Build a version of Juju with an "official" build number added in:
JUJU_BUILD_NUMBER=666; make install
As a developer, bootstrap a controller and ensure upgrades with --build-agent work.
Hack the official version yaml file to perform the test with what juju thinks is an official version.
Acceptance tests should also start passing.