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 files for branch main #6124

Merged
merged 1 commit into from
Dec 10, 2024
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
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-406-g5f397e3
2021.08.26-413-g9b1257e
8 changes: 7 additions & 1 deletion .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
name: "Core PR static checks"
on:
pull_request_target:
types: ["opened", "synchronize", "reopened"]
types:
- "opened"
- "synchronize"
- "reopened"
branches:
- "main"
- "[0-9]+.[0-9]+"

# This workflow runs with elevated permissions.
# Do not even think about running a single bit of code from the PR.
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/scripts/publish_client_gem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,16 @@ cd "$(dirname "$(realpath -e "$0")")"/../../..

VERSION="$1"

if [[ -z "$VERSION" ]]; then
if [[ -z "${VERSION}" ]]
then
echo "No version specified."
exit 1
fi

RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https://rubygems.org/gems/pulpcore_client/versions/$VERSION")"

if [ "$RESPONSE" == "200" ];
then
echo "pulpcore client $VERSION has already been released. Skipping."
exit
fi

mkdir -p ~/.gem
touch ~/.gem/credentials
echo "---
:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
sudo chmod 600 ~/.gem/credentials
gem push "pulpcore_client-${VERSION}.gem"
gem push "pulp_file_client-${VERSION}.gem"
Expand Down
43 changes: 10 additions & 33 deletions .github/workflows/scripts/publish_client_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,17 @@ cd "$(dirname "$(realpath -e "$0")")/../../.."

VERSION="$1"

if [[ -z "$VERSION" ]]; then
if [[ -z "${VERSION}" ]]
then
echo "No version specified."
exit 1
fi

RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https://pypi.org/project/pulpcore-client/$VERSION/")"

if [ "$RESPONSE" == "200" ];
then
echo "pulpcore client $VERSION has already been released. Skipping."
else
twine upload -u __token__ -p "$PYPI_API_TOKEN" \
"dist/pulpcore_client-$VERSION-py3-none-any.whl" \
"dist/pulpcore-client-$VERSION.tar.gz"
fi

RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https://pypi.org/project/pulp-file-client/$VERSION/")"

if [ "$RESPONSE" == "200" ];
then
echo "pulp_file client $VERSION has already been released. Skipping."
else
twine upload -u __token__ -p "$PYPI_API_TOKEN" \
"dist/pulp_file_client-$VERSION-py3-none-any.whl" \
"dist/pulp_file-client-$VERSION.tar.gz"
fi

RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https://pypi.org/project/pulp-certguard-client/$VERSION/")"

if [ "$RESPONSE" == "200" ];
then
echo "pulp_certguard client $VERSION has already been released. Skipping."
else
twine upload -u __token__ -p "$PYPI_API_TOKEN" \
"dist/pulp_certguard_client-$VERSION-py3-none-any.whl" \
"dist/pulp_certguard-client-$VERSION.tar.gz"
fi
twine upload -u __token__ -p "${PYPI_API_TOKEN}" \
"dist/pulpcore_client-${VERSION}-py3-none-any.whl" \
"dist/pulpcore-client-${VERSION}.tar.gz" \
"dist/pulp_file_client-${VERSION}-py3-none-any.whl" \
"dist/pulp_file-client-${VERSION}.tar.gz" \
"dist/pulp_certguard_client-${VERSION}-py3-none-any.whl" \
"dist/pulp_certguard-client-${VERSION}.tar.gz" \
;
17 changes: 5 additions & 12 deletions .github/workflows/scripts/publish_plugin_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@ cd "$(dirname "$(realpath -e "$0")")"/../../..

VERSION="$1"

if [[ -z "$VERSION" ]]; then
if [[ -z "${VERSION}" ]]
then
echo "No version specified."
exit 1
fi

RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https://pypi.org/project/pulpcore/$VERSION/")"

if [ "$RESPONSE" == "200" ];
then
echo "pulpcore $VERSION has already been released. Skipping."
exit
fi

twine upload -u __token__ -p "$PYPI_API_TOKEN" \
dist/pulpcore-"$VERSION"-py3-none-any.whl \
dist/pulpcore-"$VERSION".tar.gz \
twine upload -u __token__ -p "${PYPI_API_TOKEN}" \
"dist/pulpcore-${VERSION}-py3-none-any.whl" \
"dist/pulpcore-${VERSION}.tar.gz" \
;
63 changes: 63 additions & 0 deletions .github/workflows/update_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_main"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -65,6 +66,14 @@ jobs:
branch: "update-ci/main"
base: "main"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_main.outputs.pull-request-number }}"
if: "steps.create_pr_main.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
Expand All @@ -78,6 +87,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_3_22"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -87,6 +97,14 @@ jobs:
branch: "update-ci/3.22"
base: "3.22"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_3_22.outputs.pull-request-number }}"
if: "steps.create_pr_3_22.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
Expand All @@ -100,6 +118,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_3_28"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -109,6 +128,14 @@ jobs:
branch: "update-ci/3.28"
base: "3.28"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_3_28.outputs.pull-request-number }}"
if: "steps.create_pr_3_28.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
Expand All @@ -122,6 +149,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_3_39"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -131,6 +159,14 @@ jobs:
branch: "update-ci/3.39"
base: "3.39"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_3_39.outputs.pull-request-number }}"
if: "steps.create_pr_3_39.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
Expand All @@ -144,6 +180,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_3_49"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -153,6 +190,14 @@ jobs:
branch: "update-ci/3.49"
base: "3.49"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_3_49.outputs.pull-request-number }}"
if: "steps.create_pr_3_49.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
Expand All @@ -166,6 +211,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_3_63"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -175,6 +221,14 @@ jobs:
branch: "update-ci/3.63"
base: "3.63"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_3_63.outputs.pull-request-number }}"
if: "steps.create_pr_3_63.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
Expand All @@ -188,6 +242,7 @@ jobs:

- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v6"
id: "create_pr_3_68"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulpcore"
Expand All @@ -197,4 +252,12 @@ jobs:
branch: "update-ci/3.68"
base: "3.68"
delete-branch: true
- name: "Mark PR automerge"
working-directory: "pulpcore"
run: |
gh pr merge --rebase --auto "${{ steps.create_pr_3_68.outputs.pull-request-number }}"
if: "steps.create_pr_3_68.outputs.pull-request-number"
env:
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
...
Loading