diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-02-20 12:11:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 12:11:04 -0500 |
commit | 4ad5c5d058cc9501ef2f294cb6430d9ffe372e7d (patch) | |
tree | 6854d0cdcdf5c5b202ba06debd0e8b0731b9f011 /packages | |
parent | 87cd040ed8fe7195cbb357ed3bbf53cd2a81436c (diff) | |
download | vyos-cloud-init-4ad5c5d058cc9501ef2f294cb6430d9ffe372e7d.tar.gz vyos-cloud-init-4ad5c5d058cc9501ef2f294cb6430d9ffe372e7d.zip |
Update tooling for GitHub-based new releases (#223)
* tools/read-version: don't enforce version parity in release branch CI
We have a bootstrapping problem with new releases, currently. To take
the example of 20.1: the branch that bumps the version fails CI because
there is no 20.1 tag for it to use in read-version. Previously, this
was solved by creating a tag and pushing it to the cloud-init repo
before the commit landed. However, we have GitHub branch protection
enabled, so the commit that needs to be tagged is not created until the
pull request lands in master.
This works around this problem by introducing a very specific check: if
we are performing CI for an upstream release branch, we skip the
read-version checking that we know will fail.
* tools/make-tarball: add --version parameter
When using make-tarball as part of a CI build of a new upstream release,
the version it determines is inconsistent with the version that other
tools determine. Instead of encoding the logic here (as well as in
Python elsewhere), we add a parameter to allow us to set it from outside
the script.
* packages/bddeb: handle missing version_long in new version CI
If we're running in CI for a new upstream release, we have to use
`version` instead of `version_long` (because we don't yet have the tag
required to generate `version_long`).
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/bddeb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/bddeb b/packages/bddeb index 95602a02..209765a5 100755 --- a/packages/bddeb +++ b/packages/bddeb @@ -177,6 +177,11 @@ def main(): # output like 0.7.6-1022-g36e92d3 ver_data = read_version() + if ver_data['is_release_branch_ci']: + # If we're performing CI for a new release branch, we don't yet + # have the tag required to generate version_long; use version + # instead. + ver_data['version_long'] = ver_data['version'] # This is really only a temporary archive # since we will extract it then add in the debian @@ -192,7 +197,9 @@ def main(): break if path is None: print("Creating a temp tarball using the 'make-tarball' helper") - run_helper('make-tarball', ['--long', '--output=' + tarball_fp]) + run_helper('make-tarball', + ['--version', ver_data['version_long'], + '--output=' + tarball_fp]) print("Extracting temporary tarball %r" % (tarball)) cmd = ['tar', '-xvzf', tarball_fp, '-C', tdir] |