From 114bc7f5dcfc21148b48d202b944734d51c639ee Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 11 Aug 2024 17:32:50 +0000 Subject: [PATCH] Update CI files [noissue] --- .ci/scripts/validate_commit_message.py | 8 ++------ .github/template_gitref | 2 +- .github/workflows/create-branch.yml | 15 +++++++-------- .github/workflows/scripts/install.sh | 6 ++---- .github/workflows/update_ci.yml | 2 +- template_config.yml | 3 +-- 6 files changed, 14 insertions(+), 22 deletions(-) diff --git a/.ci/scripts/validate_commit_message.py b/.ci/scripts/validate_commit_message.py index a2b263f933..0cb09d7d1d 100755 --- a/.ci/scripts/validate_commit_message.py +++ b/.ci/scripts/validate_commit_message.py @@ -9,21 +9,17 @@ import sys from pathlib import Path import subprocess - - import os import warnings from github import Github - NO_ISSUE = "[noissue]" CHANGELOG_EXTS = [".feature", ".bugfix", ".doc", ".removal", ".misc", ".deprecation"] +KEYWORDS = ["fixes", "closes"] + sha = sys.argv[1] message = subprocess.check_output(["git", "log", "--format=%B", "-n 1", sha]).decode("utf-8") - -KEYWORDS = ["fixes", "closes"] - g = Github(os.environ.get("GITHUB_TOKEN")) repo = g.get_repo("pulp/pulpcore") diff --git a/.github/template_gitref b/.github/template_gitref index b1d8419f4a..ded489e778 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-371-gc66a678 +2021.08.26-377-g1ba8f46 diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml index 95368e7126..814ab05e0e 100644 --- a/.github/workflows/create-branch.yml +++ b/.github/workflows/create-branch.yml @@ -26,6 +26,12 @@ jobs: fetch-depth: 0 path: "pulpcore" + - uses: "actions/checkout@v4" + with: + fetch-depth: 1 + repository: "pulp/plugin_template" + path: "plugin_template" + - uses: "actions/setup-python@v5" with: python-version: "3.11" @@ -33,7 +39,7 @@ jobs: - name: "Install python dependencies" run: | echo ::group::PYDEPS - pip install bump2version jinja2 pyyaml packaging requests + pip install bump2version packaging -r plugin_template/requirements.txt echo ::endgroup:: - name: "Setting secrets" @@ -71,13 +77,6 @@ jobs: run: | find CHANGES -type f -regex ".*\.\(bugfix\|doc\|feature\|misc\|deprecation\|removal\)" -exec git rm {} + - - name: Checkout plugin template - uses: actions/checkout@v4 - with: - repository: pulp/plugin_template - path: plugin_template - fetch-depth: 0 - - name: Update CI branches in template_config working-directory: plugin_template run: | diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index 7c191a9cee..5da90c1f2b 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -21,13 +21,11 @@ PLUGIN_SOURCE="./pulpcore/dist/pulpcore-${PLUGIN_VERSION}-py3-none-any.whl" export PULP_API_ROOT="/pulp/" PIP_REQUIREMENTS=("pulp-cli") -if [[ "$TEST" = "publish" ]] -then - PIP_REQUIREMENTS+=("psycopg2-binary") -fi +# This must be the **only** call to "pip install" on the test runner. pip install ${PIP_REQUIREMENTS[*]} +# Check out the pulp-cli branch matching the installed version. PULP_CLI_VERSION="$(pip freeze | sed -n -e 's/pulp-cli==//p')" git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git ../pulp-cli diff --git a/.github/workflows/update_ci.yml b/.github/workflows/update_ci.yml index 0ce0b4598c..52ff19e6a9 100644 --- a/.github/workflows/update_ci.yml +++ b/.github/workflows/update_ci.yml @@ -36,7 +36,7 @@ jobs: - name: "Install python dependencies" run: | echo ::group::PYDEPS - pip install gitpython requests packaging jinja2 pyyaml + pip install gitpython packaging -r plugin_template/requirements.txt echo ::endgroup:: - name: "Configure Git with pulpbot name and email" diff --git a/template_config.yml b/template_config.yml index c3750fc915..fd474dd482 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-371-gc66a678 +# generated with plugin_template@2021.08.26-377-g1ba8f46 api_root: /pulp/ black: true @@ -25,7 +25,6 @@ flake8: true flake8_ignore: - ./pulpcore/app/protobuf/* github_org: pulp -issue_tracker: github latest_release_branch: '3.57' lint_requirements: true noissue_marker: '[noissue]'