diff --git a/.sops.yaml b/.sops.yaml index 52d69f21..ef9ae572 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -1,18 +1,19 @@ keys: - admins: - gpg: &admin_gpg_keys - - &admin_gpg_djerun EF643F59E008414882232C78FFA8331EEB7D6B70 - - &admin_gpg_stb 21C9579E6503CA815A68ABD8541F9408A813C8B7 - - &admin_gpg_jtbx 18DFCE01456DAB52EA38A6584EDC64F35FA1D6A5 - - &admin_gpg_fi 9633412309CCB83BFA39BA5F2FEF746201D7FCFE - - &admin_gpg_june 057870A2C72CD82566A3EC983695F4FCBCAE4912 - - &admin_gpg_haegar F38C9D4228FC6F674E322D9C3326D914EB9B8F55 - # - &admin_gpg_dario 5DA93D5C9D7320E1BD3522C79C78172B3551C9FD # expired - - &admin_gpg_echtnurich 8996B62CBD159DCADD3B6DC08BB33A8ABCF7BC4A - - &admin_gpg_c6ristian B71138A6A8964A3C3B8899857B4F70C356765BAB - - &admin_gpg_lilly D2E9C0807BF681F5E164DAFC5EE1B61CD90954CD - - &admin_gpg_langoor 878FEA3CB6A6F6E7CD80ECBE28506E3585F9F533 - - &admin_gpg_bitwhisker 41FFAF3D519CF5C039FBD8414BCC213729AF0E49 + admins: &admin_keys + pgp: &admin_pgp_keys + - &admin_pgp_djerun EF643F59E008414882232C78FFA8331EEB7D6B70 + - &admin_pgp_stb 21C9579E6503CA815A68ABD8541F9408A813C8B7 + - &admin_pgp_fi 9633412309CCB83BFA39BA5F2FEF746201D7FCFE + - &admin_pgp_june 057870A2C72CD82566A3EC983695F4FCBCAE4912 + - &admin_pgp_haegar F38C9D4228FC6F674E322D9C3326D914EB9B8F55 + # - &admin_pgp_dario 5DA93D5C9D7320E1BD3522C79C78172B3551C9FD # expired + - &admin_pgp_echtnurich 8996B62CBD159DCADD3B6DC08BB33A8ABCF7BC4A + - &admin_pgp_c6ristian B71138A6A8964A3C3B8899857B4F70C356765BAB + - &admin_pgp_lilly D2E9C0807BF681F5E164DAFC5EE1B61CD90954CD + - &admin_pgp_langoor 878FEA3CB6A6F6E7CD80ECBE28506E3585F9F533 + - &admin_pgp_bitwhisker 41FFAF3D519CF5C039FBD8414BCC213729AF0E49 + age: &admin_age_keys + - &admin_age_jtbx ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBQgnQAq6FUSDK8bxtYPjx3oRCAKG+xy9J3Gas2ztJk hosts: chaosknoten: age: &host_chaosknoten_age_keys @@ -57,222 +58,222 @@ creation_rules: ## group vars - path_regex: "inventories/chaosknoten/group_vars/.+\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: *host_chaosknoten_age_keys + merge: + - *admin_keys - path_regex: "inventories/external/group_vars/.+\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: *host_external_age_keys + merge: + - *admin_keys - path_regex: "inventories/z9/group_vars/.+\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: *host_z9_age_keys + merge: + - *admin_keys ## host vars # chaosknoten hosts - path_regex: "inventories/chaosknoten/host_vars/acmedns\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_acmedns_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/cloud\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_cloud_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/jitsi\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_jitsi_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/keycloak\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_keycloak_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/grafana\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_grafana_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/pad\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_pad_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/ccchoir\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_ccchoir_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/pretalx\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_pretalx_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/netbox\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_netbox_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/tickets\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_tickets_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/onlyoffice\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_onlyoffice_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/zammad\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_zammad_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/ntfy\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_ntfy_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/eh22-wiki\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_eh22_wiki_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/sunders\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_sunders_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/wiki\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_wiki_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/renovate\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_renovate_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/lists\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_lists_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/mumble\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_mumble_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/public-reverse-proxy\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_public_reverse_proxy_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/spaceapiccc\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_spaceapiccc_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/draupnir\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_draupnir_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/diday-staging-runner\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_diday_staging_runner_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/auth-dns\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_auth_dns_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/forgejo-runner\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_forgejo_runner_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/chaosknoten/host_vars/forgejo-runner-external\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_forgejo_runner_external_ansible_pull_age_key + merge: + - *admin_keys # external hosts - path_regex: "inventories/external/host_vars/status\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_status_ansible_pull_age_key + merge: + - *admin_keys # z9 hosts - path_regex: "inventories/z9/host_vars/dooris\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_dooris_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/z9/host_vars/light\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_light_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/z9/host_vars/waybackproxy\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_waybackproxy_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/z9/host_vars/yate\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_yate_ansible_pull_age_key + merge: + - *admin_keys - path_regex: "inventories/z9/host_vars/z9-router\\.sops\\..+" key_groups: - - pgp: - *admin_gpg_keys - age: + - age: - *host_z9_router_ansible_pull_age_key + merge: + - *admin_keys # general - path_regex: ".+\\.sops\\..+" key_groups: - - pgp: *admin_gpg_keys + - *admin_keys stores: yaml: diff --git a/ansible.cfg b/ansible.cfg index 1814d27a..dd281164 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,6 +2,6 @@ inventory = ./inventories/z9/hosts.yaml pipelining = True vars_plugins_enabled = host_group_vars,community.sops.sops -collections_path = ./ansible_collections -roles_path = ./ansible_collections +collections_path = ./ +roles_path = ./galaxy-roles interpreter_python = python3 diff --git a/ansible_collections/ansible-mysql-5.2.0.tar.gz b/ansible_collections/ansible-mysql-5.2.0.tar.gz deleted file mode 100644 index deb20c28..00000000 Binary files a/ansible_collections/ansible-mysql-5.2.0.tar.gz and /dev/null differ diff --git a/ansible_collections/ansible-posix-2.2.2.tar.gz b/ansible_collections/ansible-posix-2.2.2.tar.gz deleted file mode 100644 index 2979b623..00000000 Binary files a/ansible_collections/ansible-posix-2.2.2.tar.gz and /dev/null differ diff --git a/ansible_collections/ansible-utils-6.1.1.tar.gz b/ansible_collections/ansible-utils-6.1.1.tar.gz deleted file mode 100644 index 79a55b39..00000000 Binary files a/ansible_collections/ansible-utils-6.1.1.tar.gz and /dev/null differ diff --git a/ansible_collections/community-crypto-3.4.0.tar.gz b/ansible_collections/community-crypto-3.4.0.tar.gz deleted file mode 100644 index c3395f09..00000000 Binary files a/ansible_collections/community-crypto-3.4.0.tar.gz and /dev/null differ diff --git a/ansible_collections/community-docker-5.3.0.tar.gz b/ansible_collections/community-docker-5.3.0.tar.gz deleted file mode 100644 index 61fddf87..00000000 Binary files a/ansible_collections/community-docker-5.3.0.tar.gz and /dev/null differ diff --git a/ansible_collections/community-general-13.4.0.tar.gz b/ansible_collections/community-general-13.4.0.tar.gz deleted file mode 100644 index f00e2419..00000000 Binary files a/ansible_collections/community-general-13.4.0.tar.gz and /dev/null differ diff --git a/ansible_collections/community-library_inventory_filtering_v1-1.1.5.tar.gz b/ansible_collections/community-library_inventory_filtering_v1-1.1.5.tar.gz deleted file mode 100644 index 23eb3ac1..00000000 Binary files a/ansible_collections/community-library_inventory_filtering_v1-1.1.5.tar.gz and /dev/null differ diff --git a/ansible_collections/community-libvirt-2.3.0.tar.gz b/ansible_collections/community-libvirt-2.3.0.tar.gz deleted file mode 100644 index cde6710d..00000000 Binary files a/ansible_collections/community-libvirt-2.3.0.tar.gz and /dev/null differ diff --git a/ansible_collections/community-postgresql-5.0.0.tar.gz b/ansible_collections/community-postgresql-5.0.0.tar.gz deleted file mode 100644 index 675b43f1..00000000 Binary files a/ansible_collections/community-postgresql-5.0.0.tar.gz and /dev/null differ diff --git a/ansible_collections/community-rabbitmq-1.7.0.tar.gz b/ansible_collections/community-rabbitmq-1.7.0.tar.gz deleted file mode 100644 index 1b66f86d..00000000 Binary files a/ansible_collections/community-rabbitmq-1.7.0.tar.gz and /dev/null differ diff --git a/ansible_collections/community-sops-2.2.7.tar.gz b/ansible_collections/community-sops-2.2.7.tar.gz deleted file mode 100644 index 32f740c0..00000000 Binary files a/ansible_collections/community-sops-2.2.7.tar.gz and /dev/null differ diff --git a/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml b/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml index 1eed207d..1919fe7d 100644 --- a/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml +++ b/ansible_collections/community/docker/.azure-pipelines/azure-pipelines.yml @@ -37,116 +37,244 @@ variables: - name: coverageBranches value: main - name: entryPoint - value: tests/utils/shippable/nox.sh - - name: prepareEntryPoint - value: tests/utils/shippable/nox-prepare.sh + value: tests/utils/shippable/shippable.sh - name: fetchDepth value: 0 resources: containers: - container: default - image: quay.io/ansible/azure-pipelines-test-container:8.0.0 + image: quay.io/ansible/azure-pipelines-test-container:7.0.0 pool: Standard stages: - - stage: remote_2_19 - displayName: Remote 2.19 + +### Sanity & units + - stage: Ansible_devel + displayName: Sanity & Units devel dependsOn: [] - variables: - entryPoint: tests/utils/shippable/nox.sh jobs: - template: templates/matrix.yml parameters: targets: - - name: Ubuntu 22.04 + group 1 - test: ansible-test-integration-2.19-ubuntu-22.04-azp-1 - - name: Ubuntu 22.04 + group 2 - test: ansible-test-integration-2.19-ubuntu-22.04-azp-2 - - name: Ubuntu 22.04 + group 3 - test: ansible-test-integration-2.19-ubuntu-22.04-azp-3 - - name: Ubuntu 22.04 + group 4 - test: ansible-test-integration-2.19-ubuntu-22.04-azp-4 - - name: Ubuntu 22.04 + group 5 - test: ansible-test-integration-2.19-ubuntu-22.04-azp-5 - - - stage: remote_2_20 - displayName: Remote 2.20 + - name: Sanity + test: 'devel/sanity/1' + - name: Units + test: 'devel/units/1' + - stage: Ansible_2_20 + displayName: Sanity & Units 2.20 dependsOn: [] - variables: - entryPoint: tests/utils/shippable/nox.sh jobs: - template: templates/matrix.yml parameters: targets: - - name: RHEL 9.7 + group 1 - test: ansible-test-integration-2.20-rhel-9.7-azp-1 - - name: RHEL 9.7 + group 2 - test: ansible-test-integration-2.20-rhel-9.7-azp-2 - - name: RHEL 9.7 + group 3 - test: ansible-test-integration-2.20-rhel-9.7-azp-3 - - name: RHEL 9.7 + group 4 - test: ansible-test-integration-2.20-rhel-9.7-azp-4 - - name: RHEL 9.7 + group 5 - test: ansible-test-integration-2.20-rhel-9.7-azp-5 - - - stage: remote_2_21 - displayName: Remote 2.21 + - name: Sanity + test: '2.20/sanity/1' + - name: Units + test: '2.20/units/1' + - stage: Ansible_2_19 + displayName: Sanity & Units 2.19 dependsOn: [] - variables: - entryPoint: tests/utils/shippable/nox.sh jobs: - template: templates/matrix.yml parameters: targets: - - name: RHEL 10.1 + group 1 - test: ansible-test-integration-2.21-rhel-10.1-azp-1 - - name: RHEL 10.1 + group 2 - test: ansible-test-integration-2.21-rhel-10.1-azp-2 - - name: RHEL 10.1 + group 3 - test: ansible-test-integration-2.21-rhel-10.1-azp-3 - - name: RHEL 10.1 + group 4 - test: ansible-test-integration-2.21-rhel-10.1-azp-4 - - name: RHEL 10.1 + group 5 - test: ansible-test-integration-2.21-rhel-10.1-azp-5 + - name: Sanity + test: '2.19/sanity/1' + - name: Units + test: '2.19/units/1' + - stage: Ansible_2_18 + displayName: Sanity & Units 2.18 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.18/sanity/1' + - name: Units + test: '2.18/units/1' - - stage: remote_devel +### Docker + - stage: Docker_devel + displayName: Docker devel + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: devel/linux/{0} + targets: + - name: Fedora 42 + test: fedora42 + - name: Ubuntu 22.04 + test: ubuntu2204 + - name: Ubuntu 24.04 + test: ubuntu2404 + - name: Alpine 3.22 + test: alpine322 + groups: + - 4 + - 5 + - stage: Docker_2_20 + displayName: Docker 2.20 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.20/linux/{0} + targets: + - name: Fedora 42 + test: fedora42 + - name: Alpine 3.22 + test: alpine322 + groups: + - 4 + - 5 + - stage: Docker_2_19 + displayName: Docker 2.19 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.19/linux/{0} + targets: + - name: Fedora 41 + test: fedora41 + - name: Alpine 3.21 + test: alpine321 + groups: + - 4 + - 5 + - stage: Docker_2_18 + displayName: Docker 2.18 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.18/linux/{0} + targets: + - name: Fedora 40 + test: fedora40 + - name: Ubuntu 22.04 + test: ubuntu2204 + - name: Alpine 3.20 + test: alpine320 + groups: + - 4 + - 5 + +### Community Docker + - stage: Docker_community_devel + displayName: Docker (community images) devel + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: devel/linux-community/{0} + targets: + - name: Debian 11 Bullseye + test: debian-bullseye/3.9 + - name: Debian 12 Bookworm + test: debian-bookworm/3.11 + - name: Debian 13 Trixie + test: debian-13-trixie/3.13 + - name: ArchLinux + test: archlinux/3.13 + groups: + - 4 + - 5 + +### Remote + - stage: Remote_devel displayName: Remote devel dependsOn: [] - variables: - entryPoint: tests/utils/shippable/nox.sh jobs: - template: templates/matrix.yml parameters: + testFormat: devel/{0} targets: - - name: RHEL 10.2 + group 1 + sdk-dev-latest - test: ansible-test-integration-devel-rhel-10.2-azp-1 - - name: RHEL 10.2 + group 2 + sdk-dev-latest - test: ansible-test-integration-devel-rhel-10.2-azp-2 - - name: RHEL 10.2 + group 3 + sdk-dev-latest - test: ansible-test-integration-devel-rhel-10.2-azp-3 - - name: RHEL 10.2 + group 4 + sdk-dev-latest - test: ansible-test-integration-devel-rhel-10.2-azp-4 - - name: RHEL 10.2 + group 5 + sdk-dev-latest - test: ansible-test-integration-devel-rhel-10.2-azp-5 - - name: RHEL 9.8 + group 1 - test: ansible-test-integration-devel-rhel-9.8-azp-1 - - name: RHEL 9.8 + group 2 - test: ansible-test-integration-devel-rhel-9.8-azp-2 - - name: RHEL 9.8 + group 3 - test: ansible-test-integration-devel-rhel-9.8-azp-3 - - name: RHEL 9.8 + group 4 - test: ansible-test-integration-devel-rhel-9.8-azp-4 - - name: RHEL 9.8 + group 5 - test: ansible-test-integration-devel-rhel-9.8-azp-5 + - name: RHEL 10.0 + test: rhel/10.0 + - name: RHEL 9.6 with Docker SDK, urllib3, requests from sources + test: rhel/9.6-dev-latest + # For some reason, Ubuntu 24.04 is *extremely* slower than RHEL 9.6 + # - name: Ubuntu 24.04 + # test: ubuntu/24.04 + groups: + - 1 + - 2 + - 3 + - 4 + - 5 + - stage: Remote_2_20 + displayName: Remote 2.20 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.20/{0} + targets: + - name: RHEL 9.6 + test: rhel/9.6 + groups: + - 1 + - 2 + - 3 + - 4 + - 5 + - stage: Remote_2_19 + displayName: Remote 2.19 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.19/{0} + targets: + - name: RHEL 9.5 + test: rhel/9.5 + - name: Ubuntu 22.04 + test: ubuntu/22.04 + groups: + - 1 + - 2 + - 3 + - 4 + - 5 + - stage: Remote_2_18 + displayName: Remote 2.18 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.18/{0} + targets: + - name: RHEL 9.4 + test: rhel/9.4 + groups: + - 1 + - 2 + - 3 + - 4 + - 5 + + ## Finally - stage: Summary condition: succeededOrFailed() dependsOn: - - remote_2_19 - - remote_2_20 - - remote_2_21 - - remote_devel + - Ansible_devel + - Ansible_2_20 + - Ansible_2_19 + - Ansible_2_18 + - Remote_devel + - Remote_2_20 + - Remote_2_19 + - Remote_2_18 + - Docker_devel + - Docker_2_20 + - Docker_2_19 + - Docker_2_18 + - Docker_community_devel jobs: - template: templates/coverage.yml diff --git a/ansible_collections/community/docker/.azure-pipelines/scripts/aggregate-coverage.sh b/ansible_collections/community/docker/.azure-pipelines/scripts/aggregate-coverage.sh index ca2b19de..0ccef353 100755 --- a/ansible_collections/community/docker/.azure-pipelines/scripts/aggregate-coverage.sh +++ b/ansible_collections/community/docker/.azure-pipelines/scripts/aggregate-coverage.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash +# Aggregate code coverage results for later processing. + # Copyright (c) Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -# Aggregate code coverage results for later processing. - set -o pipefail -eu agent_temp_directory="$1" @@ -13,6 +13,10 @@ PATH="${PWD}/bin:${PATH}" mkdir "${agent_temp_directory}/coverage/" +if [[ "$(ansible --version)" =~ \ 2\.9\. ]]; then + exit +fi + options=(--venv --venv-system-site-packages --color -v) ansible-test coverage combine --group-by command --export "${agent_temp_directory}/coverage/" "${options[@]}" diff --git a/ansible_collections/community/docker/.azure-pipelines/scripts/combine-coverage.py b/ansible_collections/community/docker/.azure-pipelines/scripts/combine-coverage.py index bf1592a0..3b2fd993 100755 --- a/ansible_collections/community/docker/.azure-pipelines/scripts/combine-coverage.py +++ b/ansible_collections/community/docker/.azure-pipelines/scripts/combine-coverage.py @@ -11,7 +11,8 @@ Keep in mind that Azure Pipelines does not enforce unique job display names (onl It is up to pipeline authors to avoid name collisions when deviating from the recommended format. """ -from __future__ import annotations +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import re @@ -23,12 +24,12 @@ def main(): """Main program entry point.""" source_directory = sys.argv[1] - if "/ansible_collections/" in os.getcwd(): + if '/ansible_collections/' in os.getcwd(): output_path = "tests/output" else: output_path = "test/results" - destination_directory = os.path.join(output_path, "coverage") + destination_directory = os.path.join(output_path, 'coverage') if not os.path.exists(destination_directory): os.makedirs(destination_directory) @@ -37,27 +38,27 @@ def main(): count = 0 for name in os.listdir(source_directory): - match = re.search("^Coverage (?P[0-9]+) (?P