diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
commit | 7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch) | |
tree | efb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/community/digitalocean/.github | |
parent | Releasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff) | |
download | ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/digitalocean/.github')
5 files changed, 123 insertions, 210 deletions
diff --git a/ansible_collections/community/digitalocean/.github/workflows/ansible-test-integration.yml b/ansible_collections/community/digitalocean/.github/workflows/ansible-test-integration.yml index d2962f216..f0729fd64 100644 --- a/ansible_collections/community/digitalocean/.github/workflows/ansible-test-integration.yml +++ b/ansible_collections/community/digitalocean/.github/workflows/ansible-test-integration.yml @@ -1,24 +1,32 @@ -name: integration +name: Integration tests on: push: - branches: - - main - schedule: - - cron: "10 6 * * *" + branches: [main] workflow_dispatch: concurrency: - group: cloud-integration-tests + group: ${{ github.workflow }} cancel-in-progress: false +env: + # NOTE: Yes, the origination is not from a PR :smile: but we do have + # integration tests on PR and we want the cloud resources uniquely named + PR_NUMBER: 0 + jobs: integration: - runs-on: ubuntu-latest - timeout-minutes: 40 + runs-on: ubuntu-22.04 + environment: main + timeout-minutes: 60 + name: Integration (Ⓐ${{ matrix.versions.ansible }} on ${{ matrix.versions.python }} / ${{ matrix.module }}) strategy: fail-fast: false max-parallel: 1 matrix: + # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html + versions: + - ansible: stable-2.14 + python: "3.9" module: - digital_ocean_account_info - digital_ocean_balance_info @@ -31,7 +39,7 @@ jobs: - digital_ocean_database_info - digital_ocean_domain - digital_ocean_domain_info - - digital_ocean_domain_record + # - digital_ocean_domain_record # No test - digital_ocean_domain_record_info - digital_ocean_droplet - digital_ocean_droplet_info @@ -45,9 +53,10 @@ jobs: - digital_ocean_load_balancer - digital_ocean_load_balancer_info - digital_ocean_monitoring_alerts - - digital_ocean_monitoring_alerts_info + # - digital_ocean_monitoring_alerts_info # No test - digital_ocean_project - digital_ocean_project_info + - digital_ocean_project_resource_info - digital_ocean_region_info - digital_ocean_size_info - digital_ocean_snapshot @@ -61,7 +70,6 @@ jobs: - digital_ocean_volume_info - digital_ocean_vpc - digital_ocean_vpc_info - steps: - name: Perform testing uses: ansible-community/ansible-test-gh-action@release/v1 @@ -73,8 +81,8 @@ jobs: ./tests/utils/render.sh tests/integration/integration_config.yml.template > tests/integration/integration_config.yml - origin-python-version: 3.9 + ansible-core-version: ${{ matrix.versions.ansible }} + origin-python-version: ${{ matrix.versions.python }} target: ${{ matrix.module }} - target-python-version: 3.9 + target-python-version: ${{ matrix.versions.python }} testing-type: integration - test-deps: community.general diff --git a/ansible_collections/community/digitalocean/.github/workflows/ansible-test-sanity.yml b/ansible_collections/community/digitalocean/.github/workflows/ansible-test-sanity.yml index 95cde9006..25df12475 100644 --- a/ansible_collections/community/digitalocean/.github/workflows/ansible-test-sanity.yml +++ b/ansible_collections/community/digitalocean/.github/workflows/ansible-test-sanity.yml @@ -1,52 +1,29 @@ name: sanity + on: - pull_request: - types: [ opened, synchronize, reopened ] push: - branches: [ main ] - schedule: - - cron: '0 6 * * *' + branches: [main] + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: jobs: - - sanity_29: - timeout-minutes: 30 - name: Sanity (Ⓐ$${{ matrix.ansible }}) - strategy: - matrix: - ansible: - - stable-2.9 - runs-on: ubuntu-latest - steps: - - name: Perform testing - uses: ansible-community/ansible-test-gh-action@release/v1 - with: - ansible-core-version: ${{ matrix.ansible }} - # pre-test-cmd: - python-version: 3.8 - target-python-version: 3.8 - testing-type: sanity - # test-deps: - sanity: timeout-minutes: 30 name: Sanity (Ⓐ$${{ matrix.ansible }}) strategy: + fail-fast: false matrix: ansible: - - stable-2.10 - - stable-2.11 - - stable-2.12 - - stable-2.13 - - devel - runs-on: ubuntu-latest + - stable-2.12 + - stable-2.13 + - stable-2.14 + runs-on: ubuntu-22.04 steps: - name: Perform testing uses: ansible-community/ansible-test-gh-action@release/v1 with: ansible-core-version: ${{ matrix.ansible }} - # pre-test-cmd: - python-version: 3.9 + origin-python-version: 3.9 target-python-version: 3.9 testing-type: sanity - # test-deps: diff --git a/ansible_collections/community/digitalocean/.github/workflows/ansible-test-unit.yml b/ansible_collections/community/digitalocean/.github/workflows/ansible-test-unit.yml index 4b3615c1d..7639c7f0f 100644 --- a/ansible_collections/community/digitalocean/.github/workflows/ansible-test-unit.yml +++ b/ansible_collections/community/digitalocean/.github/workflows/ansible-test-unit.yml @@ -1,57 +1,29 @@ name: unit on: - pull_request: - types: [ opened, synchronize, reopened ] push: - branches: [ main ] - schedule: - - cron: '10 6 * * *' + branches: [main] + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: jobs: - - units_29: - runs-on: ubuntu-latest - timeout-minutes: 30 - name: Units (Ⓐ${{ matrix.ansible }}) - strategy: - fail-fast: true - matrix: - ansible: - - stable-2.9 - steps: - - name: Perform testing - uses: ansible-community/ansible-test-gh-action@release/v1 - with: - ansible-core-version: ${{ matrix.ansible }} - # pre-test-cmd: - python-version: 3.8 - target-python-version: 3.8 - testing-type: units - test-deps: >- - ansible.netcommon - ansible.utils - community.general - units: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 30 name: Units (Ⓐ${{ matrix.ansible }}) strategy: - fail-fast: true + fail-fast: false matrix: ansible: - - stable-2.10 - - stable-2.11 - stable-2.12 - stable-2.13 - - devel + - stable-2.14 steps: - name: Perform testing uses: ansible-community/ansible-test-gh-action@release/v1 with: ansible-core-version: ${{ matrix.ansible }} - # pre-test-cmd: - python-version: 3.9 + origin-python-version: 3.9 target-python-version: 3.9 testing-type: units test-deps: >- diff --git a/ansible_collections/community/digitalocean/.github/workflows/black.yml b/ansible_collections/community/digitalocean/.github/workflows/black.yml index ce6685b0a..a38fe9c1a 100644 --- a/ansible_collections/community/digitalocean/.github/workflows/black.yml +++ b/ansible_collections/community/digitalocean/.github/workflows/black.yml @@ -2,15 +2,16 @@ name: black on: - pull_request: - types: [ opened, synchronize, reopened ] push: - branches: [ main ] + branches: [main] + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: psf/black@stable diff --git a/ansible_collections/community/digitalocean/.github/workflows/pull-request-integration.yml b/ansible_collections/community/digitalocean/.github/workflows/pull-request-integration.yml index b70f30e3c..9558d67b4 100644 --- a/ansible_collections/community/digitalocean/.github/workflows/pull-request-integration.yml +++ b/ansible_collections/community/digitalocean/.github/workflows/pull-request-integration.yml @@ -1,114 +1,97 @@ -name: pull-request-integration +name: Pull request integration tests on: pull_request_target: - branches: [main] - types: [opened, synchronize, reopened] + branches: + - main paths: - - plugins/module_utils/** - - plugins/modules/** + - poetry.lock + - pyproject.toml + - 'plugins/module_utils/**' + - 'plugins/modules/**' + - 'tests/integration/**' concurrency: - group: cloud-integration-tests - cancel-in-progress: false + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true env: - DEFAULT_BRANCH: remotes/origin/main + PR_NUMBER: ${{ github.event.pull_request.number }} jobs: - changes: - # Require reviewers for this environment - # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ + human-review-and-approval: + runs-on: ubuntu-22.04 + # MUST keep this environment set if using pull_request_target environment: integration - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.head_ref }} - - - name: show changes files - run: | - git diff --name-only $DEFAULT_BRANCH - - - name: get changed module_utils - id: changed-module-utils - run: | - basenames=() - for file in $(git diff --name-only $DEFAULT_BRANCH | grep 'plugins/module_utils/'); do - basenames+=($(basename $file .py)) - done - printf '::set-output name=matrix::%s\n' $(printf '%s\n' "${basenames[@]}" | jq -R . | jq -sc .) + - name: Wait for approval + run: sleep 10 - - name: get changed modules - id: changed-modules - run: | - basenames=() - for file in $(git diff --name-only $DEFAULT_BRANCH | grep 'plugins/modules/'); do - basenames+=($(basename $file .py)) - done - printf '::set-output name=matrix::%s\n' $(printf '%s\n' "${basenames[@]}" | jq -R . | jq -sc .) - - outputs: - module-utils-matrix: ${{ steps.changed-module-utils.outputs.matrix }} - module-matrix: ${{ steps.changed-modules.outputs.matrix }} - - test-module-utils: - environment: integration - runs-on: ubuntu-latest - timeout-minutes: 120 - needs: [changes] - if: ${{ needs.changes.outputs.module-utils-matrix != '[""]' }} + test-integration: + needs: human-review-and-approval + runs-on: ubuntu-22.04 + # NOTE using the 'needs' as a gate ... the 'integration' environment has + # required reviewers (which is a good idea since we're using pull_request_target) + timeout-minutes: 90 strategy: fail-fast: false + # NOTE we're hitting 429s (too many requests) max-parallel: 1 matrix: + versions: + - ansible: stable-2.14 + python: "3.9" module: - - digital_ocean_account_info - - digital_ocean_balance_info - - digital_ocean_block_storage - - digital_ocean_cdn_endpoints - - digital_ocean_cdn_endpoints_info - - digital_ocean_certificate - - digital_ocean_certificate_info - - digital_ocean_database - - digital_ocean_database_info - - digital_ocean_domain - - digital_ocean_domain_info - - digital_ocean_domain_record - - digital_ocean_domain_record_info - - digital_ocean_droplet - - digital_ocean_droplet_info - - digital_ocean_firewall - - digital_ocean_firewall_info - - digital_ocean_floating_ip - - digital_ocean_floating_ip_info - - digital_ocean_image_info - - digital_ocean_kubernetes - - digital_ocean_kubernetes_info - - digital_ocean_load_balancer - - digital_ocean_load_balancer_info - - digital_ocean_monitoring_alerts - - digital_ocean_monitoring_alerts_info - - digital_ocean_project - - digital_ocean_project_info - - digital_ocean_region_info - - digital_ocean_size_info - - digital_ocean_snapshot - - digital_ocean_snapshot_info - - digital_ocean_spaces - - digital_ocean_spaces_info - - digital_ocean_sshkey - - digital_ocean_sshkey_info - - digital_ocean_tag - - digital_ocean_tag_info - - digital_ocean_volume_info - - digital_ocean_vpc - - digital_ocean_vpc_info + - digital_ocean_account_info + - digital_ocean_balance_info + - digital_ocean_block_storage + - digital_ocean_cdn_endpoints + - digital_ocean_cdn_endpoints_info + - digital_ocean_certificate + - digital_ocean_certificate_info + - digital_ocean_database + - digital_ocean_database_info + - digital_ocean_domain + - digital_ocean_domain_info + # - digital_ocean_domain_record # No test + - digital_ocean_domain_record_info + - digital_ocean_droplet + - digital_ocean_droplet_info + - digital_ocean_firewall + - digital_ocean_firewall_info + - digital_ocean_floating_ip + - digital_ocean_floating_ip_info + - digital_ocean_image_info + - digital_ocean_kubernetes + - digital_ocean_kubernetes_info + - digital_ocean_load_balancer + - digital_ocean_load_balancer_info + - digital_ocean_monitoring_alerts + # - digital_ocean_monitoring_alerts_info # No test + - digital_ocean_project + - digital_ocean_project_info + - digital_ocean_project_resource_info + - digital_ocean_region_info + - digital_ocean_size_info + - digital_ocean_snapshot + - digital_ocean_snapshot_info + - digital_ocean_spaces + - digital_ocean_spaces_info + - digital_ocean_sshkey + - digital_ocean_sshkey_info + - digital_ocean_tag + - digital_ocean_tag_info + - digital_ocean_volume_info + - digital_ocean_vpc + - digital_ocean_vpc_info steps: - - name: Perform testing (all modules) + - name: Perform integration testing uses: ansible-community/ansible-test-gh-action@release/v1 with: + # MUST set 'git-checkout-ref' if using pull_request_target + # MUST use an Environment if using pull_request_target + # 'github.event.pull_request.head.sha' checks out the + # PR source repo's code, which should be considered untrusted git-checkout-ref: ${{ github.event.pull_request.head.sha }} pre-test-cmd: >- DO_API_KEY=${{ secrets.DO_API_KEY }} @@ -117,36 +100,8 @@ jobs: ./tests/utils/render.sh tests/integration/integration_config.yml.template > tests/integration/integration_config.yml - origin-python-version: 3.9 - target-python-version: 3.9 - testing-type: integration - test-deps: community.general + ansible-core-version: ${{ matrix.versions.ansible }} + origin-python-version: ${{ matrix.versions.python }} target: ${{ matrix.module }} - - test-modules: - environment: integration - runs-on: ubuntu-latest - timeout-minutes: 40 - needs: [changes] - if: ${{ needs.changes.outputs.module-utils-matrix == '[""]' && needs.changes.outputs.module-matrix != '[""]' }} - strategy: - fail-fast: false - matrix: - module: ${{ fromJSON(needs.changes.outputs.module-matrix) }} - steps: - - name: Perform testing (changed module) - uses: ansible-community/ansible-test-gh-action@release/v1 - with: - git-checkout-ref: ${{ github.event.pull_request.head.sha }} - pre-test-cmd: >- - DO_API_KEY=${{ secrets.DO_API_KEY }} - AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} - ./tests/utils/render.sh - tests/integration/integration_config.yml.template - > tests/integration/integration_config.yml - origin-python-version: 3.9 - target-python-version: 3.9 + target-python-version: ${{ matrix.versions.python }} testing-type: integration - test-deps: community.general - target: ${{ matrix.module }} |