From d59c8d9345e65b8dca86961d1f119b3f73273e43 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 22 Jun 2026 08:05:45 +0200 Subject: [PATCH] CI: remove no longer needed shippable scripts; modernize and harmonize AZP scripts (#1286) * Remove no longer needed shippable scripts. * Modernize and harmonize AZP scripts. --- .../scripts/aggregate-coverage.sh | 8 +- .azure-pipelines/scripts/combine-coverage.py | 27 +- .azure-pipelines/scripts/process-results.sh | 4 +- .azure-pipelines/scripts/publish-codecov.py | 43 ++-- .azure-pipelines/scripts/report-coverage.sh | 8 +- .azure-pipelines/scripts/run-tests.sh | 4 +- .azure-pipelines/scripts/time-command.py | 13 +- tests/utils/shippable/alpine.sh | 1 - tests/utils/shippable/fedora.sh | 1 - tests/utils/shippable/linux-community.sh | 31 --- tests/utils/shippable/linux.sh | 30 --- tests/utils/shippable/remote.sh | 48 ---- tests/utils/shippable/rhel.sh | 1 - tests/utils/shippable/sanity.sh | 17 -- tests/utils/shippable/shippable.sh | 234 ------------------ tests/utils/shippable/ubuntu.sh | 1 - tests/utils/shippable/units.sh | 29 --- 17 files changed, 50 insertions(+), 450 deletions(-) delete mode 120000 tests/utils/shippable/alpine.sh delete mode 120000 tests/utils/shippable/fedora.sh delete mode 100755 tests/utils/shippable/linux-community.sh delete mode 100755 tests/utils/shippable/linux.sh delete mode 100755 tests/utils/shippable/remote.sh delete mode 120000 tests/utils/shippable/rhel.sh delete mode 100755 tests/utils/shippable/sanity.sh delete mode 100755 tests/utils/shippable/shippable.sh delete mode 120000 tests/utils/shippable/ubuntu.sh delete mode 100755 tests/utils/shippable/units.sh diff --git a/.azure-pipelines/scripts/aggregate-coverage.sh b/.azure-pipelines/scripts/aggregate-coverage.sh index 0ccef353..ca2b19de 100755 --- a/.azure-pipelines/scripts/aggregate-coverage.sh +++ b/.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,10 +13,6 @@ 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/.azure-pipelines/scripts/combine-coverage.py b/.azure-pipelines/scripts/combine-coverage.py index 3b2fd993..bf1592a0 100755 --- a/.azure-pipelines/scripts/combine-coverage.py +++ b/.azure-pipelines/scripts/combine-coverage.py @@ -11,8 +11,7 @@ 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 (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations import os import re @@ -24,12 +23,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) @@ -38,27 +37,27 @@ def main(): count = 0 for name in os.listdir(source_directory): - match = re.search('^Coverage (?P[0-9]+) (?P