From df39958f75e14896de8ed967854b3eb05b0cf5ca Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Mon, 31 Jan 2022 13:57:16 +0000 Subject: [PATCH] Update CI (#1106) No-Issue --- .ci/ansible/Containerfile.j2 | 2 +- .ci/ansible/settings.py.j2 | 3 + .github/template_gitref | 2 +- .github/workflows/ci.yml | 9 ++- .github/workflows/nightly_latest.yml | 25 ++++++++ .github/workflows/scripts/script.sh | 5 +- .../scripts/stage-changelog-for-master.py | 64 ------------------- template_config.yml | 6 +- 8 files changed, 46 insertions(+), 70 deletions(-) delete mode 100755 .github/workflows/scripts/stage-changelog-for-master.py diff --git a/.ci/ansible/Containerfile.j2 b/.ci/ansible/Containerfile.j2 index 3aea0c1c66..6b131be344 100644 --- a/.ci/ansible/Containerfile.j2 +++ b/.ci/ansible/Containerfile.j2 @@ -1,4 +1,4 @@ -FROM {{ ci_base | default("pulp/pulp-ci-centos:" + pulp_container_tag) }} +FROM {{ ci_base | default("ghcr.io/pulp/pulp-ci-centos:" + pulp_container_tag) }} # Add source directories to container {% for item in plugins %} diff --git a/.ci/ansible/settings.py.j2 b/.ci/ansible/settings.py.j2 index dcbe1d71f3..694641d8e5 100644 --- a/.ci/ansible/settings.py.j2 +++ b/.ci/ansible/settings.py.j2 @@ -5,6 +5,9 @@ PRIVATE_KEY_PATH = "/etc/pulp/certs/token_private_key.pem" PUBLIC_KEY_PATH = "/etc/pulp/certs/token_public_key.pem" TOKEN_SERVER = "{{ pulp_scheme }}://pulp:{{ 443 if pulp_scheme == 'https' else 80 }}/token/" TOKEN_SIGNATURE_ALGORITHM = "ES256" +CACHE_ENABLED = True +REDIS_HOST = "localhost" +REDIS_PORT = 6379 {% if pulp_settings %} {% for key, value in pulp_settings.items() %} diff --git a/.github/template_gitref b/.github/template_gitref index 47638df12a..1b8061f348 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-52-gf91faee +2021.08.26-65-g3505809 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f4fc10702..d72b24e4ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,10 @@ jobs: - TEST: pulp - TEST: azure - TEST: s3 + outputs: + deprecations-pulp: ${{ steps.deprecations.outputs.deprecations-pulp }} + deprecations-azure: ${{ steps.deprecations.outputs.deprecations-azure }} + deprecations-s3: ${{ steps.deprecations.outputs.deprecations-s3 }} steps: - uses: actions/checkout@v2 @@ -180,6 +184,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} + - name: Extract Deprecations from Logs + id: deprecations + run: echo "::set-output name=deprecations-${{ matrix.env.TEST }}::$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0)" + - name: Logs if: always() run: | @@ -192,7 +200,6 @@ jobs: docker exec pulp cat /etc/yum.repos.d/* || true docker exec pulp pip3 list - update_manifest: runs-on: ubuntu-latest diff --git a/.github/workflows/nightly_latest.yml b/.github/workflows/nightly_latest.yml index b124eb0ff0..407aba052d 100644 --- a/.github/workflows/nightly_latest.yml +++ b/.github/workflows/nightly_latest.yml @@ -20,6 +20,10 @@ jobs: - TEST: pulp - TEST: azure - TEST: s3 + outputs: + deprecations-pulp: ${{ steps.deprecations.outputs.deprecations-pulp }} + deprecations-azure: ${{ steps.deprecations.outputs.deprecations-azure }} + deprecations-s3: ${{ steps.deprecations.outputs.deprecations-s3 }} steps: - uses: actions/checkout@v2 @@ -117,6 +121,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} + - name: Extract Deprecations from Logs + id: deprecations + run: echo "::set-output name=deprecations-${{ matrix.env.TEST }}::$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0)" + - name: Logs if: always() run: | @@ -128,3 +136,20 @@ jobs: docker exec pulp ls -latr /etc/yum.repos.d/ || true docker exec pulp cat /etc/yum.repos.d/* || true docker exec pulp pip3 list + + deprecations: + runs-on: ubuntu-latest + if: always() + needs: test + steps: + - name: Fail on deprecations + run: | + test -z "${{ needs.test.outputs.deprecations-pulp }}" + test -z "${{ needs.test.outputs.deprecations-azure }}" + test -z "${{ needs.test.outputs.deprecations-s3 }}" + - name: Print deprecations + if: failure() + run: | + echo "${{ needs.test.outputs.deprecations-pulp }}" | base64 -d + echo "${{ needs.test.outputs.deprecations-azure }}" | base64 -d + echo "${{ needs.test.outputs.deprecations-s3 }}" | base64 -d \ No newline at end of file diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index 22eaa3c84d..584a0c1a02 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -135,7 +135,10 @@ fi if [ -f $FUNC_TEST_SCRIPT ]; then source $FUNC_TEST_SCRIPT else - pytest -v -r sx --color=yes --pyargs galaxy_ng.tests.functional + + pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs galaxy_ng.tests.functional -m parallel -n 8 + pytest -v -r sx --color=yes --pyargs galaxy_ng.tests.functional -m "not parallel" + fi if [ -f $POST_SCRIPT ]; then diff --git a/.github/workflows/scripts/stage-changelog-for-master.py b/.github/workflows/scripts/stage-changelog-for-master.py deleted file mode 100755 index 758920b146..0000000000 --- a/.github/workflows/scripts/stage-changelog-for-master.py +++ /dev/null @@ -1,64 +0,0 @@ -# WARNING: DO NOT EDIT! -# -# This file was generated by plugin_template, and is managed by it. Please use -# './plugin-template --github galaxy_ng' to update this file. -# -# For more info visit https://github.com/pulp/plugin_template - -import argparse -import os -import textwrap - -from git import Repo -from git.exc import GitCommandError - - -helper = textwrap.dedent( - """\ - Stage the changelog for a release on master branch. - - Example: - $ python .github/workflows/scripts/stage-changelog-for-master.py 3.4.0 - - """ -) - -parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper) - -parser.add_argument( - "release_version", - type=str, - help="The version string for the release.", -) - -args = parser.parse_args() - -release_version_arg = args.release_version - -release_path = os.path.dirname(os.path.abspath(__file__)) -plugin_path = release_path.split("/.github")[0] - -print(f"\n\nRepo path: {plugin_path}") -repo = Repo(plugin_path) - -changelog_commit = None -# Look for a commit with the requested release version -for commit in repo.iter_commits(): - if f"{release_version_arg} changelog" == commit.message.split("\n")[0]: - changelog_commit = commit - break - -if not changelog_commit: - raise RuntimeError("Changelog commit for {release_version_arg} was not found.") - -git = repo.git -git.stash() -git.checkout("origin/master") -try: - git.cherry_pick(changelog_commit.hexsha) -except GitCommandError: - git.add("CHANGES/") - # Don't try opening an editor for the commit message - with git.custom_environment(GIT_EDITOR="true"): - git.cherry_pick("--continue") -git.reset("origin/master") diff --git a/template_config.yml b/template_config.yml index ea46db77d5..e63660959e 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-47-g98a48cc +# generated with plugin_template@2021.08.26-65-g3505809 additional_repos: - bindings: true @@ -43,6 +43,7 @@ docs_test: false flake8: true issue_tracker: null noissue_marker: No-Issue +parallel_test_workers: 8 plugin_app_label: galaxy plugin_camel: GalaxyNG plugin_camel_short: Galaxy @@ -85,11 +86,12 @@ tasking_allow_async_unsafe: true test_azure: true test_bindings: false test_cli: false +test_deprecations: false test_performance: false test_released_plugin_with_next_pulpcore_release: false test_s3: true travis_addtl_services: [] travis_notifications: null -update_redmine: false +update_github: false upgrade_range: []