Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI branches #597

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .ci/scripts/update_ci_branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from yaml import safe_load
from packaging import version

branches = ["3.28", "3.23", "3.22", "3.21", "3.18", "3.16"]

# We use this to check if the version is x,y, like a normal branch.
def isfloat(num):
try:
Expand All @@ -19,10 +17,19 @@ def isfloat(num):
}

github_api = "https://api.github.com"
core_template_config = "https://raw.githubusercontent.com/pulp/pulpcore/main/template_config.yml"

request = requests.get(core_template_config)
if request.status_code != 200:
print("Failed to find supported branches")
exit(1)

template = safe_load(request.content)
branches = template.get("supported_release_branches", [])

for branch in branches:
print(f"Updating {branch}")
if isfloat(branch) and version.parse(branch) < version.parse("3.22") :
if isfloat(branch) and version.parse(branch) < version.parse("3.22"):
workflow_path = "/actions/workflows/publish_images.yaml/dispatches"
else:
workflow_path = "/actions/workflows/pulp_images.yml/dispatches"
Expand Down
Loading