summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2020-09-27 22:34:12 -0700
committerGitHub <noreply@github.com>2020-09-28 00:34:12 -0500
commitc4e3552c8d08f4c563b28c1d8c27de3742919030 (patch)
treedc17206aa2b6e97238f3c27756c2222ce9d4d409
parent988d410e171c5a0983370ecf8c183b2d0b01d509 (diff)
downloadansible-c4e3552c8d08f4c563b28c1d8c27de3742919030.tar.gz
[stable-2.10] CI provider fixes for ansible-test. (#71929) (#71932)
* Make Azure Pipelines resource_prefix lowercase. * Make classification of CI files consistent. * Update package-data sanity test for AZP. (cherry picked from commit 92b66e3e31470ab09d503537b692e1cf671a4e51) Co-authored-by: Matt Clay <mclay@redhat.com>
-rw-r--r--changelogs/fragments/ansible-test-azp-resource-prefix.yml2
-rw-r--r--changelogs/fragments/ansible-test-change-classification.yml2
-rw-r--r--test/lib/ansible_test/_internal/ci/azp.py2
-rw-r--r--test/lib/ansible_test/_internal/classification.py11
-rwxr-xr-xtest/sanity/code-smell/package-data.py1
5 files changed, 16 insertions, 2 deletions
diff --git a/changelogs/fragments/ansible-test-azp-resource-prefix.yml b/changelogs/fragments/ansible-test-azp-resource-prefix.yml
new file mode 100644
index 0000000000..0c0d22f01e
--- /dev/null
+++ b/changelogs/fragments/ansible-test-azp-resource-prefix.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - ansible-test - The ``resource_prefix`` variable provided to tests running on Azure Pipelines is now converted to lowercase to match other CI providers.
diff --git a/changelogs/fragments/ansible-test-change-classification.yml b/changelogs/fragments/ansible-test-change-classification.yml
new file mode 100644
index 0000000000..de812b2aea
--- /dev/null
+++ b/changelogs/fragments/ansible-test-change-classification.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - ansible-test - Change classification using ``--changed`` now consistently handles common configuration files for supported CI providers.
diff --git a/test/lib/ansible_test/_internal/ci/azp.py b/test/lib/ansible_test/_internal/ci/azp.py
index e001100a87..1b7a6398bc 100644
--- a/test/lib/ansible_test/_internal/ci/azp.py
+++ b/test/lib/ansible_test/_internal/ci/azp.py
@@ -73,7 +73,7 @@ class AzurePipelines(CIProvider):
except KeyError as ex:
raise MissingEnvironmentVariable(name=ex.args[0])
- prefix = re.sub(r'[^a-zA-Z0-9]+', '-', prefix)
+ prefix = re.sub(r'[^a-zA-Z0-9]+', '-', prefix).lower()
return prefix
diff --git a/test/lib/ansible_test/_internal/classification.py b/test/lib/ansible_test/_internal/classification.py
index c2f5158163..8eaf573c11 100644
--- a/test/lib/ansible_test/_internal/classification.py
+++ b/test/lib/ansible_test/_internal/classification.py
@@ -377,6 +377,16 @@ class PathMapper:
minimal = {}
+ if os.path.sep not in path:
+ if filename in (
+ 'azure-pipelines.yml',
+ 'shippable.yml',
+ ):
+ return all_tests(self.args) # test infrastructure, run all tests
+
+ if is_subdir(path, '.azure-pipelines'):
+ return all_tests(self.args) # test infrastructure, run all tests
+
if is_subdir(path, '.github'):
return minimal
@@ -873,7 +883,6 @@ class PathMapper:
if path in (
'setup.py',
- 'shippable.yml',
):
return all_tests(self.args) # broad impact, run all tests
diff --git a/test/sanity/code-smell/package-data.py b/test/sanity/code-smell/package-data.py
index 7525dd73d4..822c11d5dc 100755
--- a/test/sanity/code-smell/package-data.py
+++ b/test/sanity/code-smell/package-data.py
@@ -21,6 +21,7 @@ def assemble_files_to_ship(complete_file_list):
# All files which are in the repository except these:
ignore_patterns = (
# Developer-only tools
+ '.azure-pipelines/*',
'.github/*',
'.github/*/*',
'changelogs/fragments/*',