Commit Graph

59 Commits

Author SHA1 Message Date
Előd Illés 14d9c4940d [release-tool] Fix branch creation exceptions
Patch I55ee87cdb9ee712c334c798a1c2a7ba745e5870e extended the
make_branch.sh script to not (re)create stable/* or unmaintained/*
branches in case a <series>-eol tag exists. However the bash string
manipulation magic doesn't work correctly in the job, which
resulted that some stable/* branches were recreated.

This fix removes the complex magic and only relies the proved to be
functioning string manipulation.

Change-Id: I3aecdc03ec720ea756a5ba467cc6073b7b7d7941
2024-03-14 14:56:37 +01:00
Zuul 701ccad42b Merge "Adapt make_branch script to new 'unmaintained/<series>' branch" 2024-02-29 16:54:27 +00:00
Dr. Jens Harbott d60e16aad4 Update reno update to check whether series exists
Currently there is an error happening if a deliverable does not have the
series defined which is being transitioned to unmaintained. Check
whether the series file actually exists before trying to modify it and
exit gracefully if it doesn't.

Change-Id: I8817a95656bad0b03243a415c4d3d364e85c048c
2024-02-06 09:23:08 +01:00
Előd Illés b857857055 [relmgt] Update reno when cutting unmaintained branch
When we cut unmaintained/<series> branch, the <series>.rst reno page
needs to be updated to use unmaintained/<series> branch instead of
stable/<series> branch, as that is deleted.

Change-Id: I811d13d4d524ae83e14acbe8e16888c7f1d91e57
2024-02-05 11:11:02 +01:00
Dr. Jens Harbott ce12bf5522 Use updated git cache dir default path
This was updated in the release repo with [0] but missed to update in
this copy here.

[0] I7c3ed1e08c7ef1a62845df0d9c5b22f400d8d90b

Change-Id: If45f95cf530984240b9999f06b28c2602b03ab26
2024-02-01 21:11:42 +01:00
Előd Illés 80fa9e7a2c Adapt make_branch script to new 'unmaintained/<series>' branch
With the new TC resolution the community replaces Extended Maintenance
with Unmaintained status [1].
The make_branch.sh script needs to be extended to
- do not re-create stable/<series> branch when <series>-eom tag exists
- do not re-create unmaintained/<series> branch when <series>-eol tag
  exists

[1] https://governance.openstack.org/tc/resolutions/20230724-unmaintained-branches.html

Change-Id: I55ee87cdb9ee712c334c798a1c2a7ba745e5870e
2024-01-12 14:49:30 +00:00
Előd Illés 5ded5656e8 Fix release-id fetching for release job
With a recent patch a new release job error came up [1]:
when fetching the release-id from the series_status.yaml the yaml
parser resolves the new names (eg: 2023.1) as float, so we have to
convert it to string to be able to concatenate it to 'stable/' string.

[1]
File "/home/zuul/scripts/release-tools/process_release_requests.py", line 116, in get_branch
branch = "stable/" + series.get("release-id", series_name)
TypeError: can only concatenate str (not "float") to str

Change-Id: I4e317919292d7481b2ffd15b68473fff5b4b9aaf
2023-06-28 20:40:03 +02:00
Tony Breeds 9522729809 Add the branch to the release metadata
In [1] we saw that releases on antelope are proposed as constraint
updates on master.  This is another case where series != release-id.
Add meta:branch to the release metadata and use that when updating
constraints

[1] https://review.opendev.org/q/I369b2140ff3203d069530dcbabffb79cd29d859b

Change-Id: Ic4ea185d54a7e82bcb9fae3c1291a4c3bb456f22
2023-06-15 13:22:54 -07:00
Tony Breeds a952de8752 Remove the CLOSED_SERIES static list
Currently we have a, short, static list of closed releases.  We
maintain this data in series_status.yaml.  This change loads this
data to build CLOSED_SERIES on load.

Change-Id: I3270eb7771f892cf8b2de760c1d0966bcfc8417c
2023-06-15 13:22:54 -07:00
Előd Illés 306e2381ec Prevent recreate EOL'd branch
In case a branch is End of Life (marked with either $series-eol or
bugfix-<version>-eol) and was deleted before, then our script recreates
it based on the info in deliverable's yaml file.

This patch extends the script by checking if an *-eol tag exists and
in case it does then exits without creating again the already deleted
branch.

Change-Id: I1b763aa52703221d211156c060b8998282fcfc5d
2023-04-27 17:21:37 +02:00
Előd Illés a1c4ec1a29 Remove add_master_python3_jobs.sh
In Zed cycle, TC agreed to use the unversioned job template [1]
(implemented in [2]), thus we don't need the script to generate the
patches. This removes the script and also the lines where the script is
called from, so OpenStack Bot won't propose any change regarding the
series specific job templates.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L360
[2] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/856903

Change-Id: I8c8aa9ae1fc395361fa6162983feac631608032f
2023-02-07 19:06:17 +01:00
ghanshyam mann acbfd1d74a Make python version template unversioned
From 2023.1 cycle, TC agree to make python version
template to be unversioned
- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/856903

This commit updates the release script to update the
unversioned template from next cycle.

Change-Id: Icf03e279bf574f5ff0c0f14b53c4ef76b6098c46
2022-09-12 11:03:59 +00:00
Zuul e8e7e4620e Merge "Set launchpad bug Fix Released after adding comment" 2021-10-07 16:38:58 +00:00
melanie witt b6bcacee65 Set launchpad bug Fix Released after adding comment
This adds a step in the launchpad interaction during a release to set
the bug task status to "Fix Released" for the series being released.

Change-Id: I9fbbed3131e2ebfd590f27c569603add15bc969d
2021-09-02 22:45:31 +00:00
manchandavishal 0cb4819d91 Retire django-openstack-auth
``django_openstack_auth`` code was merged into the main horizon
repository during the queens release. This repo is already
deprecated and now we can retire it. This patch removes all
references of ``django_openstack_auth`` as mentioned in [1].
Also, this patch takes care of step 2(End project Gating)
and and step 4(Remove Project) because
step 1(Stop requirements syncing) and step3(Remove Project Content)
is  already handled by If04778ccc99ea92355378d59e616d8794e36ea14
and I74b10a90fe79fc768cfb8de6f68d3cd2f4938e51 respectively.

Note: this patch doesn't drop the official-openstack-repo-jobs template
and noop-job because noop-job is needs to be defined for the check and
gate queues to merge a patch and official-openstack-repo-jobs is needed
to syncup the changed in github repo once Ib811fb321d18fc01f3786f8b3ab16b2eda558864
merged we can drop this template and noop-job.

[1] https://docs.openstack.org/project-team-guide/repository.html#retiring-a-repository

Change-Id: Ifa691c2d2e7ac8bb502c8fae7dbdcc89fa4ef825
2021-07-16 22:10:16 +05:30
Thierry Carrez 885330b8e7 release-scripts: Remove misleading error message
In the normal course of script execution, clone_repo.sh routinely logs
the following error message:

error: pathspec 'xxx' did not match any file(s) known to git

This error can be safely ignored, as the script moves on to checking out
master instead. But it can be (and has been) mistakenly interpreted as
the reason why the script fails.

This change avoids logging the error message and logs a clearer
explanation instead.

Change-Id: Iaaaed7b0ea343bd81b8ad898654658545942a3d0
2021-01-05 15:25:03 +01:00
Hervé Beraud 8cf1665280 Use python3 to run release note script
Use python3 when running the script to add release note page as
part of the release process.

Without that we get the following error:
```
2020-12-26 16:58:15.569890 | ubuntu-focal | + python -c 'print('\''victoria'\''.title())'
2020-12-26 16:58:15.570573 | ubuntu-focal |
/home/zuul/scripts/release-tools/add_release_note_page.sh: line 51:
python: command not found
```

c.f http://lists.openstack.org/pipermail/release-job-failures/2020-December/001499.html

Change-Id: I6a5a68570b8948692aa48f09003d26590ee621e4
2021-01-04 12:14:36 +01:00
Carlos Goncalves 742ba18990 Update branch checkout for octavia-lib DIB element
Octavia has a diskimage-builder element to install octavia-lib. When
creating an amphora image from an Octavia stable branch, the expectation
is the octavia-lib code will match the same branch (master or stable).

This patch updates the branch name and upper constraints for octavia-lib
in Octavia on stable branch creation.

This change is in line with I8eba64c886c187c8652f94735ca6153702203d17.

Depends-On: https://review.opendev.org/#/c/745506
Change-Id: I31b762f631304636bafabec9c54cd31c6c91f124
2020-09-14 08:33:09 +02:00
Riccardo Pittau 8d4315ec47 Do not update upper constraints for intermediate branches
They should use the current upper constraints.

Change-Id: If6d2d747c1db2b905e89354930647955aece9202
2020-08-17 17:28:17 +02:00
Sean McGinnis a048436971
Use python3 for update_constraints
Change-Id: Id882f4fae0152ff0ae23b6c23ce575e099fcf70c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-07-01 15:13:11 -05:00
Hervé Beraud 95c01abf38 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Icc115b2271a6fd84f3952b03406250367babd273
2020-06-02 20:44:50 +02:00
Andreas Jaeger 542e2b8e24 Fix flake8 testing
Current flake8 complains about:

  roles/copy-release-tools-scripts/files/release-tools/ \
  process_release_requests.py:74:13: E741 ambiguous variable name 'l'

Fix it.

Change-Id: I1eb3ed249aa5b368017c6be1894a91331b5a4ddb
2020-05-12 08:40:07 +02:00
Sean McGinnis 6afe343380
Include octavia files when updating branch constraints
Patch I8eba64c886c187c8652f94735ca6153702203d17 added logic to update
the constraints URL for a project specific file, but adding the file
before committing and submitting the changes was missed, resulting in
git review erroring during the rebase step of submitting the review due
to unstaged files.

Change-Id: I4d87546f12c4a866e9c666e83c42ad8d07a637a3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-23 15:37:42 -05:00
Andreas Jaeger d8c444319b Use TOX_CONSTRAINTS_FILE in release script
UPPER_CONSTRAINTS_FILE is deprecatedi[1], use the newer
TOX_CONSTRAINTS_FILE instead when creating new master versions.

[1]
https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I9df6b2bd8660cd24d8408d9753184564276ca98f
2020-04-16 05:41:20 +00:00
Andreas Jaeger 14d4a0ff75 Update update_constraints for Py3.8
Most packages don't declare py38 support yet but the
upper-constraints.txt file does. This currently leads to propose changes
that update python 3.6 and 3.7 but not 3.8 entries. Special treat 3.8.

This follows https://review.opendev.org/719346.
It fixes https://review.opendev.org/#/c/719692/1/upper-constraints.txt

Change-Id: Id6bd791b7d9d5fc4daf7b4a9d92e7e4bd6bcbb19
2020-04-15 14:55:38 +02:00
Sean McGinnis ab9564f4d6
Make job template update best effort
Some instances have failed due to the repo not being configured for the
expected series job templates. This changes the modified file detection
to only look for the zuul files we care about, then not error out on git
operations if it ends up we can't actually commit and propose changes.

Change-Id: Ic301b039d080dfc0bcbefeecce099c8fd00ad8c5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-11 14:45:20 -05:00
Zuul 0031fc28e5 Merge "Release cycle test template file cleanup" 2020-04-09 17:24:47 +00:00
Sean McGinnis b7933a7e70
Release cycle test template file cleanup
Change-Id: I3a56b537a8b96567fbef002c5b4ab3f42dcb96ba
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-09 10:59:50 -05:00
Zuul 3706b5770d Merge "Extract only series name in release job template" 2020-04-09 14:24:46 +00:00
Sean McGinnis 6c31e351b1
Extract only series name in release job template
Change-Id: I4f2aeeef533b3b92fb6b8e87a400f5dbe069e9d7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-09 07:30:07 -05:00
Sean McGinnis e8f3efeb03
Add expression switch to job update sed statement
Local testing passed, but when run in the gate, script execution failed
on the sed expression not being preceded by '-e'.

Change-Id: I02545e1f976f220f197556bdfa6e6225d9bd8d36
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-08 17:03:16 -05:00
Sean McGinnis ebee7e0d7c
Fix branch to series matching logic in job updates
Missed in Id58f439052b4ea6b092b87682576a746433dcc27 that the branch name
passed in when determining the next series name will be of the form
'stable/series', resulting in not finding the next name and job update
logic being skipped. This adjusts the branch name to properly match the
series name.

Change-Id: Ie4102ceb0d12b7d98919ddb89b8e17df1859fa6a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-08 15:40:05 -05:00
Jean-Philippe Evrard 6938731988
Add tooling to update python jobs on branch creation
Currently, we need to update jobs manually after a branch is
created.

When a project is branched, the master branch should then
be pointing to the new named python3 tests.

This should do it.

Change-Id: Id58f439052b4ea6b092b87682576a746433dcc27
2020-04-08 08:44:14 -05:00
Sean McGinnis 37b9019e96
Make update_constraints.sh aware of python_versions
Current update constraints patches replace all entries of a package with
an entry for the new version. But the upper-constraints file now needs
to have multiple entries with specific ";python_version=='x.x'" to be
able to handle differing requirements for packages that no longer
support Python 2, or even earlier Python 3 versions.

This adds awareness to the update script to only update the version for
matching python_version specifiers if they are present. It then falls
back to replacing the full line if the entry for the package does not
have any python_version markers at all.

Change-Id: I5e5e604fe9e461e45af0aa4446edd0af89d63381
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-02-25 12:29:22 -06:00
Carlos Goncalves d9f9733676 Update branch checkout and u-c.txt for Octavia
Octavia has a diskimage-builder element to install the amphora-agent.
When creating an amphora image from an Octavia stable branch, the
expectation is the amphora-agent code will match the same branch (master
or stable). However, the amphora-agent always pulls master versions of
upper-constraints.txt and of the Octavia Git repository.

This patch updates the branch name and upper constraints for the
amphora-agent in Octavia on stable branch creation.

Change-Id: I8eba64c886c187c8652f94735ca6153702203d17
2020-02-05 19:29:52 +00:00
Ian Wienand 4f6629021e Update hacking, fix errors/warnings
This version of hacking doesn't understand f-strings as usable in
Python 3.  Update to the latest and fix current issues, which are all
just formatting fixes.

Change-Id: I0a7d6f93f07477b6dd29ab143130dd9064c250be
2020-01-14 09:40:45 +11:00
Sean McGinnis 323eb4d68c
Tighten formatting for new branch reno page title
Some have pointed out that the generated page title is not strictly
correct for a valid RST title. This adds some additional formatting of
the text to make sure it is completely valid.

Change-Id: I8652be3dc987629a8acca7a1584086fc4e2f4636
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-09-12 10:40:19 -05:00
Dirk Mueller 9ffe3621ba Handle TOX_CONSTRAINTS_FILE as well as UPPER_CONSTRAINTS_FILE
In I3f957187ed4f29fcf88db99cb79fb33b21a8dd8d we'd like to rename
the use of UPPER_CONSTRAINTS_FILE to TOX_CONSTRAINTS_FILE so that
we can reuse the logic for LOWER constraints file checking as well.

Change-Id: I04066ca815814ecf66abe9cb385469969edead57
2019-05-20 20:16:56 +02:00
Andreas Jaeger ee6468b9b4 Update jobs for OpenDev
Follow OpenDev changes:
* Use gerrit.opendev.org instead of gerrit.openstack.org
* Use opendev.org insted of git.openstack.org
* Follow move of openstack-infra/project-config to
  openstack/project-config

Change-Id: Ic27ea41407abc0bdec29768e5ee5dca33f8adeda
2019-04-20 13:51:05 +00:00
Ian Wienand 74540cbb58 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I0cc16c32dcea3b6036553c9f9e8df45a241254e0
2019-03-24 20:35:36 +00:00
Doug Hellmann 092bc57dba use the new redirect target for constraints when branching
Rather than pointing to the git server, point to a redirect on the
releases.openstack.org server that we can update easily when a branch
closes.

Change-Id: Iab3b36cafdce48a84e23a3c8fd94a1b8b844a147
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2019-03-14 14:28:44 -04:00
Doug Hellmann d919755370 update the branching script to include a semver bump
We want to ensure that the version numbers on master are always higher
than the version numbers on stable branches. We can do that by
including an instruction in the commit message for the patch that adds
the reno documentation build file when a branch is created. We use
"feature" because we just need to bump the version enough to ensure it
doesn't conflict with the stable branch but do not want to force new
versions that make it appear the new release will be incompatible.

Change-Id: I99f7e3858e94ac3bdc5780945e941db6e9b2bba9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-12 11:49:46 -04:00
Doug Hellmann a1df5de264 prune dead branches when syncing with origin
The release scripts rely on having an actually up to date version of
the repo being tagged or branched. Since the repos in the CI images
may have branches that have been deleted in the upstream repository,
we need to add the --prune option when we fetch any updates to cause
those branches to be removed locally.

Change-Id: I806283102be4de5ae865ca67978216a76de96a71
Related-commit: I25848275f90ec440e85765f87a23cd1413aab6cb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-16 15:44:31 -04:00
Andreas Jaeger 989103cfde Remove eol tagging from eol_branch.sh
Tagging at eol is now done in the releases repository, thus remove
tagging from the script.

Change-Id: I9e91fb030b42cf8b238313c27d11da593a77b851
2018-08-06 19:17:53 +02:00
Andreas Jaeger 18aea9c6aa Import eol_branch.sh
Import this script from now retired openstack-infra/release-tools
repository. It is run manually at eol time to retire a branch.

Change-Id: Idcffdc5c5c540bd73ee7ee3e5be9274d693d5f1f
2018-08-06 19:12:51 +02:00
Zuul 5f91596c90 Merge "be more resilient in make_branch.sh for retired repositories" 2018-06-26 06:00:59 +00:00
Doug Hellmann 2cefc3550c use python3 to run launchpad commenting script
Use python3 when running the script to comment on launchpad tickets as
part of the release process. The depends-on patch adds the python3
version of launchpadlib via bindep.

Change-Id: I189d83462381723bb8309c248d0ace21ae6f30c1
Story: #2001691
Task: #22329
Depends-On: https://review.openstack.org/577290
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-21 16:30:26 -04:00
Doug Hellmann 65d3be0cdb be more resilient in make_branch.sh for retired repositories
Retired repositories may not have a .gitreview file in master, so we
want to check out the tag we are given to branch from instead. There's
no point in setting up git-review if we aren't going to create the
branch, so move the setup logic after the test for the existing
branch.

Change-Id: Ie8c69a9729e5e0d470c8a9292da999e275c9611a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-12 10:37:56 -04:00
Zuul e9de791b5f Merge "ignore the series_status.yaml when processing release requests" 2018-04-27 09:41:46 +00:00
Doug Hellmann 394cf0c4e3 ignore the series_status.yaml when processing release requests
The series_status.yaml file does not contain release data so
process_release_requests.py should ignore it.

Change-Id: I661c5a10b0497fd9112daea6d4737a5d15dc8b79
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-26 09:05:53 -04:00