diff --git a/.github/template_gitref b/.github/template_gitref index 50128a8a..b11f949e 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-259-ge0f38f0 +2021.08.26-265-gbdd41dd diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c2b4571..0570a373 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,11 +12,6 @@ on: inputs: release: description: "Release tag (e.g. 3.2.1)" - before_script: - description: | - Bash code to run before bindings and docs are built. This should only be used when re-running - a workflow to correct some aspect of the docs. e.g.: git checkout origin/3.14 CHANGES.rst - required: false env: RELEASE_WORKFLOW: true @@ -134,10 +129,6 @@ jobs: GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} shell: bash - - name: Additional before_script - run: ${{ github.event.inputs.before_script }} - shell: bash - - name: Install Python client run: .github/workflows/scripts/install_python_client.sh shell: bash @@ -275,16 +266,5 @@ jobs: - name: Publish client to rubygems run: bash .github/workflows/scripts/publish_client_gem.sh - - name: Update GitHub - continue-on-error: true - run: | - set -euv - export COMMIT_MSG=$(git log --format=%B --no-merges -1) - export GH_ISSUES=$(echo $COMMIT_MSG | grep -o "GH Issues: .*" | awk '{print $3}') - pip install pygithub - - echo "GH Issues $GH_ISSUES" - python .ci/scripts/update_github.py - - name: Create release on GitHub run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }} diff --git a/.github/workflows/scripts/create_release_from_tag.sh b/.github/workflows/scripts/create_release_from_tag.sh index 328454e0..4de7777d 100755 --- a/.github/workflows/scripts/create_release_from_tag.sh +++ b/.github/workflows/scripts/create_release_from_tag.sh @@ -1,7 +1,7 @@ #!/bin/sh -set -e +set -eu -curl -s -X POST https://api.github.com/repos/$GITHUB_REPOSITORY/releases \ +curl -s -X "POST https://api.github.com/repos/$GITHUB_REPOSITORY/releases" \ -H "Authorization: token $RELEASE_TOKEN" \ -d @- << EOF { diff --git a/.github/workflows/scripts/push_branch_and_tag_to_github.sh b/.github/workflows/scripts/push_branch_and_tag_to_github.sh index 2f13c78d..83e390f5 100755 --- a/.github/workflows/scripts/push_branch_and_tag_to_github.sh +++ b/.github/workflows/scripts/push_branch_and_tag_to_github.sh @@ -1,21 +1,16 @@ #!/bin/sh -set -e -BRANCH_NAME=$(echo $GITHUB_REF | sed -rn 's/refs\/heads\/(.*)/\1/p') +# WARNING: DO NOT EDIT! +# +# This file was generated by plugin_template, and is managed by it. Please use +# './plugin-template --github pulp_gem' to update this file. +# +# For more info visit https://github.com/pulp/plugin_template -ref_string=$(git show-ref --tags | grep refs/tags/$1) +set -eu -SHA=${ref_string:0:40} +BRANCH_NAME="$(echo "$GITHUB_REF" | sed -rn 's/refs\/heads\/(.*)/\1/p')" -remote_repo=https://pulpbot:${RELEASE_TOKEN}@github.com/${GITHUB_REPOSITORY}.git +remote_repo="https://pulpbot:${RELEASE_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" -git push "${remote_repo}" $BRANCH_NAME - -curl -s -X POST https://api.github.com/repos/$GITHUB_REPOSITORY/git/refs \ --H "Authorization: token $RELEASE_TOKEN" \ --d @- << EOF -{ - "ref": "refs/tags/$1", - "sha": "$SHA" -} -EOF +git push "${remote_repo}" "$BRANCH_NAME" "$1" diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index 6f4d05d1..aee99d3f 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -47,6 +47,7 @@ fi REPORTED_STATUS="$(pulp status)" if [[ "${RELEASE_WORKFLOW:-false}" == "true" ]]; then + # TODO Move this to prerelease checks REPORTED_VERSION="$(echo $REPORTED_STATUS | jq --arg plugin gem --arg legacy_plugin pulp_gem -r '.versions[] | select(.component == $plugin or .component == $legacy_plugin) | .version')" response=$(curl --write-out %{http_code} --silent --output /dev/null https://pypi.org/project/pulp-gem/$REPORTED_VERSION/) if [ "$response" == "200" ]; @@ -117,19 +118,15 @@ fi if [ -f $FUNC_TEST_SCRIPT ]; then source $FUNC_TEST_SCRIPT else - - if [[ "$GITHUB_WORKFLOW" == "Gem Nightly CI/CD" ]] || [[ "${RELEASE_WORKFLOW:-false}" == "true" ]]; then + if [[ "$GITHUB_WORKFLOW" == "Gem Nightly CI/CD" ]] + then cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_gem.tests.functional -m parallel -n 8 --nightly" cmd_user_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_gem.tests.functional -m 'not parallel' --nightly" - else cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_gem.tests.functional -m parallel -n 8" cmd_user_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_gem.tests.functional -m 'not parallel'" - - fi - fi if [ -f $POST_SCRIPT ]; then diff --git a/docs/template_gitref b/docs/template_gitref index 50128a8a..b11f949e 100644 --- a/docs/template_gitref +++ b/docs/template_gitref @@ -1 +1 @@ -2021.08.26-259-ge0f38f0 +2021.08.26-265-gbdd41dd diff --git a/template_config.yml b/template_config.yml index a290338a..007d580e 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-248-g4bfc3e1 +# generated with plugin_template@2021.08.26-265-gbdd41dd additional_repos: [] api_root: /pulp/ @@ -36,15 +36,8 @@ lint_requirements: true noissue_marker: '[noissue]' parallel_test_workers: 8 plugin_app_label: gem -plugin_camel: PulpGem -plugin_camel_short: Gem -plugin_caps: PULP_GEM -plugin_caps_short: GEM -plugin_dash: pulp-gem -plugin_dash_short: gem plugin_default_branch: main plugin_name: pulp_gem -plugin_snake: pulp_gem post_job_template: null pre_job_template: null publish_docs_to_pulpprojectdotorg: true @@ -69,7 +62,6 @@ pypi_username: None python_version: '3.8' release_email: pulp-infra@redhat.com release_user: pulpbot -run_pulpcore_tests_for_plugins: false single_commit_check: true stalebot: true stalebot_days_until_close: 30 @@ -84,6 +76,5 @@ test_lowerbounds: true test_performance: false test_reroute: true test_s3: true -update_github: true use_issue_template: true