Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 9 additions & 6 deletions .ci/scripts/check_click_for_mypy.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/env python3

import click
from packaging.version import parse
from importlib import metadata

if parse(click.__version__) < parse("8.1.1") or parse(click.__version__) >= parse("8.2"):
print("🚧 Linting with mypy is currently only supported with click~=8.1.1. 🚧")
print("🔧 Please run `pip install click~=8.1.1` first. 🔨")
exit(1)
from packaging.version import Version

if __name__ == "__main__":
click_version = Version(metadata.version("click"))
if click_version < Version("8.1.1"):
print("🚧 Linting with mypy is currently only supported with click>=8.1.1. 🚧")
print("🔧 Please run `pip install click>=8.1.1` first. 🔨")
exit(1)
25 changes: 0 additions & 25 deletions .github/dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
python-version: "3.11"
python-version: "3.14"
- name: "Install python dependencies"
run: |
pip install build setuptools wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
- name: "Checkout repository"
uses: "actions/checkout@v5"
- name: "Initialize CodeQL"
uses: "github/codeql-action/init@v4"
uses: "github/codeql-action/init@v3"
with:
languages: "python"

- name: "Perform CodeQL Analysis"
uses: "github/codeql-action/analyze@v4"
uses: "github/codeql-action/analyze@v3"
with:
category: "/language:python"
...
10 changes: 9 additions & 1 deletion .github/workflows/collect_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fetch-depth: 0
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
python-version: "3.x"
- name: "Setup git"
run: |
git config user.name pulpbot
Expand All @@ -25,10 +25,18 @@ jobs:
python3 .ci/scripts/collect_changes.py
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v7"
id: "create_pr"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
title: "Update Changelog"
body: ""
branch: "update_changes"
delete-branch: true
- name: "Mark PR automerge"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}"
if: "steps.create_pr.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
...
51 changes: 50 additions & 1 deletion .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name: "Update CI from cookiecutter"
on:
workflow_dispatch:
schedule:
- cron: "30 20 * * 0"

defaults:
run:
Expand All @@ -22,7 +24,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
python-version: "3.11"
python-version: "3.x"
- name: "Setup git"
run: |
git config user.name pulpbot
Expand Down Expand Up @@ -55,4 +57,51 @@ jobs:
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
update-dependencies:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v5"
with:
repository: "pulp/pulp-cli"
path: "pulp-cli"
- uses: "actions/checkout@v5"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp-cli-maven"
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
python-version: "3.x"
- name: "Setup git"
run: |
git config user.name pulpbot
git config user.email [email protected]
- name: "Install python dependencies"
run: |
pip install packaging tomlkit
- name: "Apply cookiecutter templates"
run: |
../pulp-cli/cookiecutter/update_pulp_cli.py
if [ "$(git status --porcelain)" ]
then
git add .
git commit -m "Update CLI and GLUE"
fi
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v7"
id: "create_pr"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
title: "Update CLI and GLUE"
body: ""
branch: "update_cli"
delete-branch: true
path: "pulp-cli-maven"
- name: "Mark PR automerge"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}"
if: "steps.create_pr.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
...
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
python:
- "3.11"
- "3.13"
- "3.14"
steps:
- uses: "actions/checkout@v5"
- uses: "actions/cache@v4"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
python-version: "3.11"
python-version: "3.x"
- name: "Install python dependencies"
run: |
pip install toml pygithub
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0
- uses: "actions/setup-python@v6"
with:
python-version: "3.12"
python-version: "3.x"
- name: "Determine PR labels"
run: |
pip install GitPython==3.1.42
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
python-version: "3.11"
python-version: "3.x"
- name: "Setup git"
run: |
git config user.name pulpbot
Expand All @@ -26,12 +26,20 @@ jobs:
.ci/scripts/create_release_branch.sh
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v7"
id: "create_pr"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
title: "Bump dev-version"
body: ""
branch: "bump_version"
delete-branch: true
- name: "Mark PR automerge"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}"
if: "steps.create_pr.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- name: "Add Backport Label for new Branch"
uses: "actions/github-script@v8"
with:
Expand Down
20 changes: 20 additions & 0 deletions releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Releasing (for internal use)

## Using Workflows

### Create a new Y-Release Branch

1. Trigger the "Create Release Branch" workflow on the "main" branch.
1. Watch for the "Bump Version" PR, verify that it deletes all the changes snippets present on the new release branch, approve and merge it.

### Release from a Release Branch

1. Trigger the "pulp-cli Release" workflow on the corresponding release branch.
1. Lean back and see the magic happen.
1. Wait for the "pulp-cli Publish" workflow to succeed.
1. Verify that a new version appeared on PyPI.
1. Verify that the docs have been updated.
1. [only Y-releases] Announce the release at https://discourse.pulpproject.org/c/announcements/6.
1. Look for the "Update Changelog" PR, approve and merge it.

If some thing goes wrong look at `.ci/scripts/create_release_branch.sh` and `.ci/scripts/release.sh` and follow the intentions encoded there.
Loading