From 369b63ddc90a523337b1d856908a97c02a6bb140 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 2 Jul 2023 02:55:06 +0000 Subject: [PATCH] Update CI files [noissue] --- .ci/scripts/changelog.py | 4 +++- .ci/scripts/check_requirements.py | 13 +++++++------ .github/template_gitref | 2 +- .github/workflows/release.yml | 6 ++++-- .github/workflows/scripts/update_ci.sh | 24 ++++++++++++------------ .github/workflows/update_ci.yml | 5 +++++ template_config.yml | 4 +++- 7 files changed, 35 insertions(+), 23 deletions(-) diff --git a/.ci/scripts/changelog.py b/.ci/scripts/changelog.py index 971d2b7c..2a9e6d7b 100755 --- a/.ci/scripts/changelog.py +++ b/.ci/scripts/changelog.py @@ -25,7 +25,9 @@ def get_changelog_releases(changelog): Get all versions in changelog. """ - versions = re.findall(r"([0-9]+)\.([0-9]+)\.([0-9]+) \(", changelog) + versions = re.findall( + r"([0-9]+)\.([0-9]+)\.([0-9][0-9ab]*) \([0-9]{4}-[0-9]{2}-[0-9]{2}\)", changelog + ) return {".".join(v) for v in versions} diff --git a/.ci/scripts/check_requirements.py b/.ci/scripts/check_requirements.py index ba09fe2b..92ea52b5 100755 --- a/.ci/scripts/check_requirements.py +++ b/.ci/scripts/check_requirements.py @@ -42,12 +42,13 @@ else: errors.append(f"{filename}:{nr}: Unreadable requirement {line}") else: - if not line.startswith("opentelemetry"): - if check_prereleases and req.specifier.prereleases: - if req.name != "pulp-certguard-client": - errors.append( - f"{filename}:{nr}: Prerelease versions found in {line}." - ) + if check_prereleases and req.specifier.prereleases: + # Do not even think about begging for more exceptions! + if ( + not req.name.startswith("opentelemetry") + and req.name != "pulp-certguard-client" + ): + errors.append(f"{filename}:{nr}: Prerelease versions found in {line}.") ops = [op for op, ver in req.specs] spec = str(req.specs) if "~=" in ops: diff --git a/.github/template_gitref b/.github/template_gitref index 2e6867f0..07d57e1f 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-219-g66afab8 +2021.08.26-225-gbfce9ef diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46580fb1..d95b2c3a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -165,7 +165,9 @@ jobs: - name: Build docs run: | pip install towncrier==19.9.0 - towncrier --yes --version 4.0.0.ci + towncrier --yes + export DJANGO_SETTINGS_MODULE=pulpcore.app.settings + export PULP_SETTINGS=$PWD/.ci/ansible/settings/settings.py make -C docs/ PULP_URL="https://pulp" diagrams html tar -cvf docs/docs.tar docs/_build @@ -251,7 +253,7 @@ jobs: - name: Publish docs to pulpproject.org run: | - tar -xvf docs.tar -C ./docs + tar -xvf docs.tar .github/workflows/scripts/publish_docs.sh tag ${{ github.event.inputs.release }} - name: Deploy plugin to pypi run: bash .github/workflows/scripts/publish_plugin_pypi.sh ${{ github.event.inputs.release }} diff --git a/.github/workflows/scripts/update_ci.sh b/.github/workflows/scripts/update_ci.sh index 33d91433..442eeb09 100755 --- a/.github/workflows/scripts/update_ci.sh +++ b/.github/workflows/scripts/update_ci.sh @@ -1,31 +1,31 @@ #!/usr/bin/env bash +# WARNING: DO NOT EDIT! +# +# This file was generated by plugin_template, and is managed by it. Please use +# './plugin-template --github pulp_certguard' to update this file. +# +# For more info visit https://github.com/pulp/plugin_template set -eu -if [ ! -d ../plugin_template ]; then - echo "Checking out plugin_template" - git clone https://github.com/pulp/plugin_template.git ../plugin_template -fi - - if [ ! -f "template_config.yml" ]; then echo "No template_config.yml detected." exit 1 fi +pip install -r ../plugin_template/test_requirements.txt + pushd ../plugin_template -pip install -r test_requirements.txt ./plugin-template --github pulp-certguard popd # Check if only gitref file has changed, so no effect on CI workflows. -if [[ `git diff --name-only` == ".github/template_gitref" ]]; then - echo "CI update has no effect on workflows, skipping PR creation." - git stash - exit 0 +if [[ $(git diff --name-only) == ".github/template_gitref" ]]; then + echo "No changes detected in github section." + git restore ".github/template_gitref" fi -if [[ `git status --porcelain` ]]; then +if [[ $(git status --porcelain) ]]; then git add -A git commit -m "Update CI files" -m "[noissue]" else diff --git a/.github/workflows/update_ci.yml b/.github/workflows/update_ci.yml index 60b272b2..45f33bc3 100644 --- a/.github/workflows/update_ci.yml +++ b/.github/workflows/update_ci.yml @@ -33,6 +33,11 @@ jobs: with: fetch-depth: 1 + - uses: actions/checkout@v3 + with: + repository: pulp/plugin_template + path: ../plugin_template + - uses: actions/setup-python@v3 with: python-version: "3.8" diff --git a/template_config.yml b/template_config.yml index 28f11c9a..d6d956b1 100644 --- a/template_config.yml +++ b/template_config.yml @@ -1,7 +1,7 @@ # This config represents the latest values used when running the plugin-template. Any settings that # were not present before running plugin-template have been added with their default values. -# generated with plugin_template@2021.08.26-212-g18b9346 +# generated with plugin_template@2021.08.26-225-gbfce9ef additional_repos: - branch: main @@ -17,6 +17,7 @@ ci_trigger: '{pull_request: {branches: [''*'']}}' ci_update_branches: - 1.5 - 1.6 +ci_update_docs: false cli_package: pulp-cli cli_repo: https://github.com/pulp/pulp-cli.git core_import_allowed: [] @@ -28,6 +29,7 @@ disabled_redis_runners: doc_requirements_from_pulpcore: false docker_fixtures: false docs_test: true +extra_docs_requirements: [] flake8: true flake8_ignore: [] github_org: pulp