From 360d0c3441dae35ad6699bd6e4f245f139bdb88d Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 5 Mar 2021 13:53:38 +0100 Subject: [PATCH 1/2] Update azure-pipelines.yml and README.md --- .azure-pipelines/azure-pipelines.yml | 2 -- README.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index ec0ea8f..ab7c4ba 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -141,8 +141,6 @@ stages: test: freebsd/11.4 - name: FreeBSD 12.2 test: freebsd/12.2 - - name: FreeBSD 12.1 - test: freebsd/12.1 - stage: Remote_2_10 displayName: Remote 2.10 dependsOn: [] diff --git a/README.md b/README.md index 19359cd..73d8a05 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An Ansible Collection of modules and plugins that target POSIX UNIX/Linux and de ## Ansible version compatibility -This collection has been tested against following Ansible versions: **>=2.9,<2.11**. +This collection has been tested against following Ansible versions: **>=2.9**. Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. From 4825036c7e3cd90372b8d31a2cd76dcf02e2f801 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Fri, 5 Mar 2021 14:25:22 +0100 Subject: [PATCH 2/2] Update AZP aggregate-coverage.sh and report-coverage.sh --- .azure-pipelines/scripts/aggregate-coverage.sh | 7 ++++++- .azure-pipelines/scripts/report-coverage.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/scripts/aggregate-coverage.sh b/.azure-pipelines/scripts/aggregate-coverage.sh index 2200502..f3113dd 100755 --- a/.azure-pipelines/scripts/aggregate-coverage.sh +++ b/.azure-pipelines/scripts/aggregate-coverage.sh @@ -12,4 +12,9 @@ mkdir "${agent_temp_directory}/coverage/" options=(--venv --venv-system-site-packages --color -v) ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}" -ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}" + +if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then + # Only analyze coverage if the installed version of ansible-test supports it. + # Doing so allows this script to work unmodified for multiple Ansible versions. + ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}" +fi diff --git a/.azure-pipelines/scripts/report-coverage.sh b/.azure-pipelines/scripts/report-coverage.sh index f154998..1bd91bd 100755 --- a/.azure-pipelines/scripts/report-coverage.sh +++ b/.azure-pipelines/scripts/report-coverage.sh @@ -5,6 +5,11 @@ set -o pipefail -eu PATH="${PWD}/bin:${PATH}" -pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check +if ! ansible-test --help >/dev/null 2>&1; then + # Install the devel version of ansible-test for generating code coverage reports. + # This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs). + # Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used. + pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check +fi ansible-test coverage xml --stub --venv --venv-system-site-packages --color -v