diff --git a/.github/template_gitref b/.github/template_gitref index e558856e9..336a16b90 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-207-g81d81f6 +2021.08.26-213-ge6bd9ec diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93049acd8..f6c0603b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ --- name: Ansible CI on: {pull_request: {branches: ['*']}} + +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true + jobs: ready-to-ship: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f784b5bce..edd049275 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,6 +11,10 @@ on: schedule: - cron: '37 1 * * 6' +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true + jobs: analyze: name: Analyze diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 496989e51..27216a2a4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,6 +14,10 @@ on: - cron: '00 3 * * *' workflow_dispatch: +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36b563b66..f0bdf303c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 1 + fetch-depth: 0 - uses: actions/setup-python@v3 with: diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index d870c9feb..e597b4de3 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -60,12 +60,6 @@ cd .. git clone --depth=1 https://github.com/pulp/pulp-openapi-generator.git -pip install pulp-cli - -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 - - # Intall requirements for ansible playbooks pip install docker netaddr boto3 ansible diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index b5ef441b2..adba38bd0 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -17,12 +17,20 @@ source .github/workflows/scripts/utils.sh export PULP_API_ROOT="/pulp/" -if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]; then - cd .. - git clone https://github.com/pulp/pulpcore.git - cd - - pip install -r ../pulpcore/doc_requirements.txt - pip install -r doc_requirements.txt +PIP_REQUIREMENTS=("pulp-cli") +if [[ "$TEST" = "docs" || "$TEST" = "publish" ]] +then + PIP_REQUIREMENTS+=("-r" "doc_requirements.txt") + git clone https://github.com/pulp/pulpcore.git ../pulpcore + PIP_REQUIREMENTS+=("psycopg2-binary" "-r" "../pulpcore/doc_requirements.txt") +fi + +pip install ${PIP_REQUIREMENTS[*]} + +if [[ "$TEST" != "docs" ]] +then + 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 fi cd .ci/ansible/ @@ -121,7 +129,9 @@ if [ "${PULP_API_ROOT:-}" ]; then fi pulp config create --base-url https://pulp --api-root "$PULP_API_ROOT" -cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml" +if [[ "$TEST" != "docs" ]]; then + cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml" +fi ansible-playbook build_container.yaml ansible-playbook start_container.yaml diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index fa5849c2f..fd7e361ba 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -99,7 +99,7 @@ cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt | tee -a "$CERTIFI" # check for any uncommitted migrations echo "Checking for uncommitted migrations..." -cmd_user_prefix bash -c "django-admin makemigrations --check --dry-run" +cmd_user_prefix bash -c "django-admin makemigrations ansible --check --dry-run" # Run unit tests. cmd_user_prefix bash -c "PULP_DATABASES__default__USER=postgres pytest -v -r sx --color=yes -p no:pulpcore --pyargs pulp_ansible.tests.unit" diff --git a/template_config.yml b/template_config.yml index 37f3ab256..e9d0ee305 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-202-g6f2c165 +# generated with plugin_template@2021.08.26-213-ge6bd9ec additional_repos: [] api_root: /pulp/ @@ -25,6 +25,7 @@ deploy_client_to_rubygems: true deploy_to_pypi: true disabled_redis_runners: - s3 +doc_requirements_from_pulpcore: true docker_fixtures: false docs_test: true flake8: true