Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .ci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ towncrier build --yes --version "${NEW_VERSION}"
bump-my-version bump release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty
bump-my-version bump patch --commit

git push origin "${BRANCH}" "${NEW_VERSION}"
git push --atomic origin "${BRANCH}" "${NEW_VERSION}"
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ name: "Build"
on:
workflow_call:

defaults:
run:
working-directory: "pulp-cli"

jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
Expand All @@ -28,8 +34,8 @@ jobs:
with:
name: "pulp_cli_packages"
path: |
.root
dist/
pulp-cli/.root
pulp-cli/dist/
if-no-files-found: "error"
retention-days: 5
...
9 changes: 6 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
name: "CodeQL"

on:
push:
branches:
- "main"
workflow_call:

defaults:
run:
working-directory: "pulp-cli"

jobs:
analyze:
name: "Analyze"
Expand All @@ -19,6 +20,8 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
- name: "Initialize CodeQL"
uses: "github/codeql-action/init@v4"
with:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/collect_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ on:
workflow_call:
workflow_dispatch:

defaults:
run:
working-directory: "pulp-cli"

jobs:
collect-changes:
permissions:
contents: "write"
pull-requests: "write"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
fetch-depth: 0
- name: "Set up Python"
uses: "actions/setup-python@v6"
Expand All @@ -32,16 +40,16 @@ jobs:
uses: "peter-evans/create-pull-request@v8"
id: "create_pr"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
title: "Update Changelog"
body: ""
branch: "update_changes"
delete-branch: true
path: "pulp-cli"
- 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 }}"
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
continue-on-error: true
...
10 changes: 6 additions & 4 deletions .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ defaults:

jobs:
update-ci:
permissions:
contents: "write"
pull-requests: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v6"
with:
repository: "pulp/pulp-cli"
path: "pulp-cli"
- uses: "actions/checkout@v6"
- name: "Checkout"
uses: "actions/checkout@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp-cli"
- name: "Set up Python"
uses: "actions/setup-python@v6"
Expand All @@ -46,7 +49,6 @@ jobs:
uses: "peter-evans/create-pull-request@v8"
id: "create_pr"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
title: "Update cookiecutter"
body: ""
branch: "update_cookiecutter"
Expand All @@ -57,6 +59,6 @@ jobs:
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 }}"
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
continue-on-error: true
...
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: "Lint"
on:
workflow_call:

defaults:
run:
working-directory: "pulp-cli"

jobs:
lint:
runs-on: "ubuntu-latest"
Expand All @@ -16,6 +20,8 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "pulp-cli Nightly"
name: "Nightly"

on:
schedule:
Expand All @@ -14,6 +14,10 @@ jobs:
- "build"
uses: "./.github/workflows/test.yml"
codeql:
permissions:
actions: "read"
contents: "read"
security-events: "write"
uses: "./.github/workflows/codeql.yml"
collect_changes:
uses: "./.github/workflows/collect_changes.yml"
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "pulp-cli CI"
name: "Pull Request"

on:
pull_request:
Expand Down Expand Up @@ -29,13 +29,18 @@ jobs:
codeql:
needs:
- "lint"
permissions:
actions: "read"
contents: "read"
security-events: "write"
uses: "./.github/workflows/codeql.yml"
check-commits:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
fetch-depth: 0
- name: "Set up Python"
uses: "actions/setup-python@v6"
Expand All @@ -60,6 +65,7 @@ jobs:
fi
done
shell: "bash"
working-directory: "pulp-cli"
ready-to-ship:
# This is a dummy dependent task to have a single entry for the branch protection rules.
runs-on: "ubuntu-latest"
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "Pulp CLI PR static checks"
name: "PR static checks"
on:
pull_request_target:
types: ["opened", "synchronize", "reopened"]
Expand All @@ -12,16 +12,21 @@ concurrency:
group: "${{ github.event.pull_request.number }}-${{ github.workflow }}"
cancel-in-progress: true

defaults:
run:
working-directory: "pulp-cli"

jobs:
apply_labels:
runs-on: "ubuntu-latest"
name: "Label PR"
permissions:
pull-requests: "write"
runs-on: "ubuntu-latest"
name: "Label PR"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
fetch-depth: 0
- name: "Set up Python"
uses: "actions/setup-python@v6"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "pulp-cli Publish"
name: "Publish"

on:
push:
Expand All @@ -9,11 +9,13 @@ on:
jobs:
build:
uses: "./.github/workflows/build.yml"
environment: "pypi"
publish-pypi:
name: "Publish to PyPI"
needs: "build"
runs-on: "ubuntu-latest"
environment:
name: "pypi"
url: "https://pypi.org/p/pulp-cli"
steps:
- name: "Download wheels"
uses: "actions/download-artifact@v8"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
---
name: "pulp-cli Release"
name: "Tag Release"

on:
workflow_dispatch:

defaults:
run:
working-directory: "pulp-cli"

jobs:
release:
name: "Release"
permissions:
contents: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v6"
- name: "Checkout"
uses: "actions/checkout@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp-cli"
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ name: "Create Release Branch"
on:
workflow_dispatch:

defaults:
run:
working-directory: "pulp-cli"

jobs:
create-release-branch:
permissions:
contents: "write"
issues: "write"
pull-requests: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v6"
- name: "Checkout"
uses: "actions/checkout@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp-cli"
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
Expand All @@ -30,17 +39,17 @@ jobs:
uses: "peter-evans/create-pull-request@v8"
id: "create_pr"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
title: "Bump dev-version"
body: ""
branch: "bump_version"
delete-branch: true
path: "pulp-cli"
- 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 }}"
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
continue-on-error: true
- name: "Add Backport Label for new Branch"
uses: "actions/github-script@v8"
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: "Test"
on:
workflow_call:

defaults:
run:
working-directory: "pulp-cli"

env:
COLORTERM: "yes"
TERM: "xterm-256color"
Expand All @@ -16,6 +20,8 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
- name: "Download wheels"
uses: "actions/download-artifact@v8"
with:
Expand All @@ -31,7 +37,7 @@ jobs:
enable-cache: true
- name: "Run tests"
run: |
uv run --isolated --with dist/pulp_glue*.whl --with dist/pulp_cli*.whl --only-group test make _unittest
uv run --isolated --with ../dist/pulp_glue*.whl --with ../dist/pulp_cli*.whl --only-group test make _unittest
test:
runs-on: "ubuntu-24.04"
needs:
Expand Down Expand Up @@ -69,6 +75,8 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
with:
path: "pulp-cli"
- name: "Download wheels"
uses: "actions/download-artifact@v8"
with:
Expand Down Expand Up @@ -105,5 +113,5 @@ jobs:
RESOLUTION=()
fi

uv run "${RESOLUTION[@]}" --isolated --with dist/pulp_glue*.whl --with dist/pulp_cli*.whl --only-group test .ci/run_container.sh make _paralleltest
uv run "${RESOLUTION[@]}" --isolated --with ../dist/pulp_glue*.whl --with ../dist/pulp_cli*.whl --only-group test .ci/run_container.sh make _paralleltest
...
Loading
Loading