Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot authored and dralley committed Jan 26, 2024
1 parent e9eaffc commit 2e5f72a
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 23 deletions.
13 changes: 8 additions & 5 deletions .ci/scripts/check_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main():
"--branches",
default="supported",
help="A comma separated list of branches to check for releases. Can also use keyword: "
"'supported'. Defaults to 'supported', see `ci_update_branches` in "
"'supported'. Defaults to 'supported', see `supported_release_branches` in "
"`plugin_template.yml`.",
)
opts = parser.parse_args()
Expand All @@ -46,12 +46,15 @@ def main():
if branches == "supported":
with open(f"{d}/template_config.yml", mode="r") as f:
tc = yaml.safe_load(f)
branches = tc["ci_update_branches"]
branches.append(DEFAULT_BRANCH)
branches = set(tc["supported_release_branches"])
latest_release_branch = tc["latest_release_branch"]
if latest_release_branch is not None:
branches.add(latest_release_branch)
branches.add(DEFAULT_BRANCH)
else:
branches = branches.split(",")
branches = set(branches.split(","))

if diff := set(branches) - set(available_branches):
if diff := branches - set(available_branches):
print(f"Supplied branches contains non-existent branches! {diff}")
exit(1)

Expand Down
8 changes: 5 additions & 3 deletions .ci/scripts/collect_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
CHANGELOG_FILE = tc_settings.get("filename", "NEWS.rst")
START_STRING = tc_settings.get(
"start_string",
"<!-- towncrier release notes start -->\n"
if CHANGELOG_FILE.endswith(".md")
else ".. towncrier release notes start\n",
(
"<!-- towncrier release notes start -->\n"
if CHANGELOG_FILE.endswith(".md")
else ".. towncrier release notes start\n"
),
)
TITLE_FORMAT = tc_settings.get("title_format", "{name} {version} ({project_date})")

Expand Down
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-308-gd58d154
2021.08.26-310-g59cd732
2 changes: 1 addition & 1 deletion .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Update CI branches in template_config
working-directory: plugin_template
run: |
python3 ./plugin-template pulpcore --github --add-version-ci-update-branches "${NEW_BRANCH}"
python3 ./plugin-template pulpcore --github --latest-release-branch "${NEW_BRANCH}"
git add -A
- name: Make a PR with version bump and without CHANGES/*
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/scripts/update_backport_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ def random_color():
assert response.status_code == 200
old_labels = set([x["name"] for x in response.json() if x["name"].startswith("backport-")])

# get ci_update_branches from template_config.yml
# get list of branches from template_config.yml
with open("./template_config.yml", "r") as f:
plugin_template = yaml.safe_load(f)
new_labels = set(["backport-" + x for x in plugin_template["ci_update_branches"]])
branches = set(plugin_template["supported_release_branches"])
latest_release_branch = plugin_template["latest_release_branch"]
if latest_release_branch is not None:
branches.add(latest_release_branch)
new_labels = {"backport-" + x for x in branches}

# delete old labels that are not in new labels
for label in old_labels.difference(new_labels):
Expand Down
2 changes: 1 addition & 1 deletion docs/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-308-gd58d154
2021.08.26-310-g59cd732
2 changes: 1 addition & 1 deletion lint_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# For more info visit https://github.com/pulp/plugin_template

# python packages handy for developers, but not required by pulp
black
black==23.12.1
check-manifest
flake8
flake8-black
Expand Down
18 changes: 9 additions & 9 deletions template_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This config represents the latest values used when running the plugin-template. Any settings that
# were not present before running plugin-template have been added with their default values.

# generated with [email protected]308-gd58d154
# generated with [email protected]310-g59cd732

api_root: /pulp/
black: true
Expand All @@ -11,15 +11,7 @@ check_manifest: true
check_stray_pulpcore_imports: false
ci_env: {}
ci_trigger: '{pull_request: {branches: [''*'']}}'
ci_update_branches:
- '3.18'
- '3.21'
- '3.22'
- '3.28'
- '3.39'
- '3.45'
ci_update_docs: true
ci_update_release_behavior: replace-previous-version
cli_package: pulp-cli
cli_repo: https://github.com/pulp/pulp-cli.git
core_import_allowed: []
Expand All @@ -38,6 +30,7 @@ flake8_ignore:
github_org: pulp
issue_tracker: github
kanban: true
latest_release_branch: null
lint_requirements: true
noissue_marker: '[noissue]'
parallel_test_workers: 8
Expand Down Expand Up @@ -85,6 +78,13 @@ stalebot: true
stalebot_days_until_close: 30
stalebot_days_until_stale: 90
stalebot_limit_to_pulls: true
supported_release_branches:
- '3.18'
- '3.21'
- '3.22'
- '3.28'
- '3.39'
- '3.45'
sync_ci: true
test_azure: true
test_cli: true
Expand Down

0 comments on commit 2e5f72a

Please sign in to comment.