Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot committed Jun 2, 2024
1 parent 56779a9 commit 7c98d7c
Show file tree
Hide file tree
Showing 22 changed files with 319 additions and 327 deletions.
8 changes: 5 additions & 3 deletions .ci/scripts/collect_changes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/env python3
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
Expand All @@ -8,13 +9,14 @@
import itertools
import os
import re
import tomllib

import toml
from git import GitCommandError, Repo
from packaging.version import parse as parse_version

# Read Towncrier settings
tc_settings = toml.load("pyproject.toml")["tool"]["towncrier"]
with open("pyproject.toml", "rb") as fp:
tc_settings = tomllib.load(fp)["tool"]["towncrier"]

CHANGELOG_FILE = tc_settings.get("filename", "NEWS.rst")
START_STRING = tc_settings.get(
Expand Down Expand Up @@ -79,7 +81,7 @@ def main():
old_length = len(main_changes)

for branch in branches:
print(f"Looking at branch {branch}")
print(f"Looking for './{CHANGELOG_FILE}' at branch {branch}")
try:
changelog = get_changelog(repo, branch)
except GitCommandError:
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-328-g59a6718
2021.08.26-337-g7c7a09a
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
fetch-depth: 1
path: "pulp_ostree"
- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install python dependencies"
Expand All @@ -36,9 +36,10 @@ jobs:
python3 setup.py sdist bdist_wheel --python-tag py3
twine check dist/*
- name: "Upload Package whl"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
with:
name: "plugin_package"
path: "pulp_ostree/dist/"
if-no-files-found: "error"
retention-days: 5
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
fetch-depth: 1

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
fetch-depth: 0
path: "pulp_ostree"
- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install python dependencies"
Expand Down Expand Up @@ -67,10 +67,11 @@ jobs:
mkdir -p "pulp_ostree"
working-directory: "."
- name: "Download Deprecations"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "deprecations"
pattern: "deprecations-*"
path: "pulp_ostree"
merge-multiple: true
- name: "Print deprecations"
run: |
cat deprecations-*.txt | sort -u
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fetch-depth: 0
path: "pulp_ostree"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 1
path: "pulp_ostree"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fetch-depth: 0
path: "pulp_ostree"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down Expand Up @@ -76,12 +76,12 @@ jobs:
fetch-depth: 1
path: "pulp_ostree"

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "plugin_package"
path: "pulp_ostree/dist/"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand All @@ -96,13 +96,13 @@ jobs:
echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV
- name: Download built docs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "docs.tar"
path: "pulp_ostree"

- name: Download Python client docs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "python-client-docs.tar"
path: "pulp_ostree"
Expand Down
43 changes: 26 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
repository: "pulp/pulp-openapi-generator"
path: "pulp-openapi-generator"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

- uses: "actions/download-artifact@v3"
- uses: "actions/download-artifact@v4"
with:
name: "plugin_package"
path: "pulp_ostree/dist/"
Expand Down Expand Up @@ -88,25 +88,32 @@ jobs:
run: |
.github/workflows/scripts/install_ruby_client.sh
shell: "bash"

- name: "Upload python client packages"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
with:
name: "python-client.tar"
path: "pulp_ostree/ostree-python-client.tar"
path: |
pulp_ostree/ostree-python-client.tar
if-no-files-found: "error"
overwrite: true

- name: "Upload python client docs"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
with:
name: "python-client-docs.tar"
path: "pulp_ostree/ostree-python-client-docs.tar"
path: |
pulp_ostree/ostree-python-client-docs.tar
if-no-files-found: "error"
overwrite: true
- name: "Upload ruby client packages"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
with:
name: "ruby-client.tar"
path: "pulp_ostree/ostree-ruby-client.tar"
path: |
pulp_ostree/ostree-ruby-client.tar
if-no-files-found: "error"
overwrite: true
- name: Build docs
run: |
export DJANGO_SETTINGS_MODULE=pulpcore.app.settings
Expand All @@ -115,10 +122,12 @@ jobs:
tar -cvf docs/docs.tar docs/_build
- name: "Upload built docs"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "docs.tar"
path: "pulp_ostree/docs/docs.tar"
if-no-files-found: "error"
overwrite: true

- name: "Logs"
if: always()
Expand All @@ -145,12 +154,12 @@ jobs:
fetch-depth: 1
path: "pulp_ostree"

- uses: "actions/download-artifact@v3"
- uses: "actions/download-artifact@v4"
with:
name: "plugin_package"
path: "pulp_ostree/dist/"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down Expand Up @@ -184,7 +193,7 @@ jobs:
path: "pulp_ostree"

- name: "Download Python client"
uses: "actions/download-artifact@v3"
uses: "actions/download-artifact@v4"
with:
name: "python-client.tar"
path: "pulp_ostree/"
Expand All @@ -193,7 +202,7 @@ jobs:
run: |
tar -xvf ostree-python-client.tar
- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down Expand Up @@ -227,7 +236,7 @@ jobs:
path: "pulp_ostree"

- name: "Download Ruby client"
uses: "actions/download-artifact@v3"
uses: "actions/download-artifact@v4"
with:
name: "ruby-client.tar"
path: "pulp_ostree/"
Expand Down Expand Up @@ -263,7 +272,7 @@ jobs:
fetch-depth: 1
path: "pulp_ostree"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand All @@ -280,13 +289,13 @@ jobs:
SECRETS_CONTEXT: "${{ toJson(secrets) }}"

- name: "Download built docs"
uses: "actions/download-artifact@v3"
uses: "actions/download-artifact@v4"
with:
name: "docs.tar"
path: "pulp_ostree/"

- name: "Download Python client docs"
uses: "actions/download-artifact@v3"
uses: "actions/download-artifact@v4"
with:
name: "python-client-docs.tar"
path: "pulp_ostree/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
path: "pulp_ostree"
token: ${{ secrets.RELEASE_TOKEN }}

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/scripts/publish_client_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https:/
if [ "$RESPONSE" == "200" ];
then
echo "pulp_ostree client $VERSION has already been released. Skipping."
exit
else
twine upload -u __token__ -p "$PYPI_API_TOKEN" \
"dist/pulp_ostree_client-$VERSION-py3-none-any.whl" \
"dist/pulp_ostree-client-$VERSION.tar.gz"
fi

twine upload -u __token__ -p "$PYPI_API_TOKEN" \
"dist/pulp_ostree_client-$VERSION-py3-none-any.whl" \
"dist/pulp_ostree-client-$VERSION.tar.gz" \
;
23 changes: 15 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
repository: "pulp/pulp-openapi-generator"
path: "pulp-openapi-generator"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

- uses: "actions/download-artifact@v3"
- uses: "actions/download-artifact@v4"
with:
name: "plugin_package"
path: "pulp_ostree/dist/"
Expand Down Expand Up @@ -119,43 +119,50 @@ jobs:
docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-${{ matrix.env.TEST }}.txt
- name: "Upload Deprecations"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "deprecations"
name: "deprecations-${{ matrix.env.TEST }}"
path: "pulp_ostree/deprecations-${{ matrix.env.TEST }}.txt"
if-no-files-found: "error"
retention-days: 5
overwrite: true
- name: Upload python client packages
if: ${{ env.TEST == 'pulp' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "python-client.tar"
path: "pulp_ostree/ostree-python-client.tar"
if-no-files-found: "error"
retention-days: 5
overwrite: true

- name: Upload python client docs
if: ${{ env.TEST == 'pulp' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "python-client-docs.tar"
path: "pulp_ostree/ostree-python-client-docs.tar"
if-no-files-found: "error"
retention-days: 5
overwrite: true
- name: Upload Ruby client
if: ${{ env.TEST == 'pulp' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "ruby-client.tar"
path: "pulp_ostree/ostree-ruby-client.tar"
if-no-files-found: "error"
retention-days: 5
overwrite: true
- name: Upload built docs
if: ${{ env.TEST == 'docs' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "docs.tar"
path: "pulp_ostree/docs/docs.tar"
if-no-files-found: "error"
retention-days: 5
overwrite: true

- name: "Logs"
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
update_backport_labels:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Configure Git with pulpbot name and email"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
repository: "pulp/plugin_template"
path: "plugin_template"

- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

Expand Down
Loading

0 comments on commit 7c98d7c

Please sign in to comment.