Skip to content

Commit 8f3f697

Browse files
authored
Merge pull request #745 from pulp/update-ci/3.12
Update CI files for branch 3.12
2 parents fa1f836 + c36335c commit 8f3f697

File tree

6 files changed

+44
-9
lines changed

6 files changed

+44
-9
lines changed

.ci/scripts/check_release.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def main():
6464
for branch in branches:
6565
if branch != DEFAULT_BRANCH:
6666
# Check if a Z release is needed
67+
reasons = []
6768
changes = repo.git.ls_tree("-r", "--name-only", f"origin/{branch}", "CHANGES/")
6869
z_changelog = False
6970
for change in changes.split("\n"):
@@ -76,23 +77,27 @@ def main():
7677
)
7778
elif ext in Z_CHANGELOG_EXTS:
7879
z_changelog = True
80+
if z_changelog:
81+
reasons.append("Backports")
7982

8083
last_tag = repo.git.describe("--tags", "--abbrev=0", f"origin/{branch}")
8184
req_txt_diff = repo.git.diff(
8285
f"{last_tag}", f"origin/{branch}", "--name-only", "--", "requirements.txt"
8386
)
84-
if z_changelog or req_txt_diff:
87+
if req_txt_diff:
88+
reasons.append("requirements.txt")
89+
90+
if reasons:
8591
curr_version = Version(last_tag)
8692
assert curr_version.base_version.startswith(
8793
branch
8894
), "Current-version has to belong to the current branch!"
8995
next_version = Version(f"{branch}.{curr_version.micro + 1}")
90-
reason = "CHANGES" if z_changelog else "requirements.txt"
9196
print(
9297
f"A Z-release is needed for {branch}, "
9398
f"Prev: {last_tag}, "
9499
f"Next: {next_version.base_version}, "
95-
f"Reason: {reason}"
100+
f"Reason: {','.join(reasons)}"
96101
)
97102
releases.append(next_version)
98103
else:

.ci/scripts/pr_labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def main():
2323
f".{item['directory']}" for item in PYPROJECT_TOML["tool"]["towncrier"]["type"]
2424
}
2525
except KeyError:
26-
CHANGELOG_EXTS = {"feature", "bugfix", "doc", "removal", "misc"}
26+
CHANGELOG_EXTS = {".feature", ".bugfix", ".doc", ".removal", ".misc"}
2727

2828
repo = Repo(".")
2929

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-383-gc4cd2b8
1+
2021.08.26-387-ge627e91

.github/workflows/scripts/script.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ pushd ../pulp-openapi-generator
4646

4747
# Workaround: Domains are not supported by the published bindings.
4848
# Sadly: Different pulpcore-versions aren't either...
49-
# So we exclude the prebuilt ones only for domains disabled.
50-
if [ "$(jq -r '.domain_enabled' <<<"${REPORTED_STATUS}")" = "true" ] || [ "$(jq -r '.online_workers[0].pulp_href|startswith("/pulp/api/v3/")' <<< "${REPORTED_STATUS}")" = "false" ]
49+
# * In the 'pulp' scenario we use the published/prebuilt bindings, so we can test it.
50+
# * In other scenarios we generate new bindings from server spec, so we have a more
51+
# reliable client.
52+
if [ "$TEST" = "pulp" ]
5153
then
52-
BUILT_CLIENTS=""
53-
else
5454
BUILT_CLIENTS=" python "
55+
else
56+
BUILT_CLIENTS=""
5557
fi
5658

5759
for ITEM in $(jq -r '.versions[] | tojson' <<<"${REPORTED_STATUS}")

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ include functest_requirements.txt
88
include test_requirements.txt
99
include unittest_requirements.txt
1010
include pulp_python/app/webserver_snippets/*
11+
exclude releasing.md

releasing.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[//]: # "WARNING: DO NOT EDIT!"
2+
[//]: # ""
3+
[//]: # "This file was generated by plugin_template, and is managed by it. Please use"
4+
[//]: # "'./plugin-template --github pulp_python' to update this file."
5+
[//]: # ""
6+
[//]: # "For more info visit https://github.com/pulp/plugin_template"
7+
# Releasing (For Internal Use)
8+
9+
This document outlines the steps to perform a release.
10+
11+
### Determine if a Release is Required
12+
- Run the release checker script:
13+
```
14+
python3 .ci/scripts/check_release.py
15+
```
16+
17+
### Create a New Y-branch (e.g., 3.23)
18+
- If a new minor version (Y) is needed, trigger a [Create New Release Branch](https://github.com/pulp/pulp_python/actions/workflows/create-branch.yml) job via the GitHub Actions.
19+
- Look for the "Bump minor version" pull request and merge it.
20+
21+
### Release a New Z-version (Patch Release) (e.g., 3.23.1, 3.22.12)
22+
- Trigger a [Release Pipeline](https://github.com/pulp/pulp_python/actions/workflows/release.yml) job by specifying the release branch (X.Y) via the GitHub Actions.
23+
24+
### Final Steps (Optional but Recommended)
25+
- Ensure the new version appears on PyPI.
26+
- Verify that the changelog has been updated by looking for the "Update Changelog" pull request.
27+
- Post a brief announcement about the new release on the [Pulp Discourse](https://discourse.pulpproject.org/).

0 commit comments

Comments
 (0)