diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 7d4b055f..9dc82da3 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -46,6 +46,7 @@ resources: pool: Standard stages: + ### Sanity & units - stage: Ansible_devel displayName: Sanity & Units devel @@ -104,6 +105,7 @@ stages: test: '2.9/sanity/1' - name: Units test: '2.9/units/1' + ### Docker - stage: Docker_devel displayName: Docker devel @@ -196,6 +198,26 @@ stages: 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 Bullseye + test: debian-bullseye/3.9 + - name: ArchLinux + test: archlinux/3.10 + - name: CentOS Stream 8 + test: centos-stream8/3.8 + groups: + - 4 + - 5 + ### Remote - stage: Remote_devel displayName: Remote devel @@ -297,5 +319,6 @@ stages: - Docker_2_11 - Docker_2_10 - Docker_2_9 + - Docker_community_devel jobs: - template: templates/coverage.yml diff --git a/tests/integration/targets/setup_docker/tasks/Archlinux.yml b/tests/integration/targets/setup_docker/tasks/Archlinux.yml new file mode 100644 index 00000000..40331145 --- /dev/null +++ b/tests/integration/targets/setup_docker/tasks/Archlinux.yml @@ -0,0 +1,6 @@ +--- +- name: Install docker + community.general.pacman: + name: docker + update_cache: yes + notify: cleanup docker diff --git a/tests/integration/targets/setup_docker/tasks/Debian.yml b/tests/integration/targets/setup_docker/tasks/Debian.yml index 84a1428b..2292dd55 100644 --- a/tests/integration/targets/setup_docker/tasks/Debian.yml +++ b/tests/integration/targets/setup_docker/tasks/Debian.yml @@ -11,10 +11,10 @@ notify: cleanup docker - name: Add gpg key - shell: curl -fsSL https://download.docker.com/linux/ubuntu/gpg >key && apt-key add key + shell: curl -fsSL https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg >key && apt-key add key - name: Add Docker repo - shell: add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + shell: add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable" - block: - name: Prevent service restart diff --git a/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml b/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml new file mode 100644 index 00000000..08464606 --- /dev/null +++ b/tests/integration/targets/setup_docker_compose/tasks/Archlinux.yml @@ -0,0 +1,5 @@ +--- +- name: Install docker-compose as system package + pacman: + name: "{{ docker_compose_packages }}" + state: present diff --git a/tests/integration/targets/setup_openssl/vars/Archlinux.yml b/tests/integration/targets/setup_openssl/vars/Archlinux.yml new file mode 100644 index 00000000..1593cfb6 --- /dev/null +++ b/tests/integration/targets/setup_openssl/vars/Archlinux.yml @@ -0,0 +1,3 @@ +--- +cryptography_package_name: python-cryptography +cryptography_package_name_python3: python-cryptography diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index 1918d0f5..66735fed 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -20,4 +20,5 @@ cmd: | sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*.repo sed -i 's%#baseurl=http://mirror.centos.org/$contentdir/$releasever/%baseurl=https://vault.centos.org/8.4.2105/%g' /etc/yum.repos.d/CentOS-Linux-*.repo + ignore_errors: true # This fails for CentOS Stream 8 when: ansible_distribution in 'CentOS' and ansible_distribution_major_version == '8' diff --git a/tests/utils/shippable/linux-community.sh b/tests/utils/shippable/linux-community.sh new file mode 100755 index 00000000..e68bdf38 --- /dev/null +++ b/tests/utils/shippable/linux-community.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -o pipefail -eux + +declare -a args +IFS='/:' read -ra args <<< "$1" + +image="${args[1]}" +python="${args[2]}" + +if [ "${#args[@]}" -gt 3 ]; then + target="shippable/posix/group${args[3]}/" +else + target="shippable/posix/" +fi + +# shellcheck disable=SC2086 +ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ + --docker "quay.io/ansible-community/test-image:${image}" --python "${python}"