Merge pull request #612 from rjeffman/ci_use_ansible_core

CI: Test modules against Ansible core 2.11 and latest Ansible
This commit is contained in:
Thomas Woerner
2021-11-24 14:14:49 +01:00
committed by GitHub
8 changed files with 155 additions and 50 deletions

View File

@@ -1,43 +1,41 @@
# Using Ansible 2.10.0a1 under Azure there might happen that the output of a
# task is changed if a module uses no_log = True for an attribute.
#
# For example, if the output of the module should contain "changed: True", and
# an attribute with no_log set contains the value `hang` it might happen that
# the output is modified to "c******ed: True", and if this output is further
# processed (registering the result and comparing the value of `changed`),
# the test might fail, but not because of module code, but because of unexpected
# output processing.
#
# This behavior was, currently, only reproduced with Ansible 2.10.0a1 running
# under Azure.
---
trigger:
- master
pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-latest'
stages:
- stage: Centos7
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-7
- stage: Centos8
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-8
# Fedora
- stage: FedoraLatest
- stage: FedoraLatest_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: ">=2.9,<2.10"
# CentOS 8
- stage: CentOS8_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-8
ansible_version: ">=2.9,<2.10"
# CentOS 7
- stage: CentOS7_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-7
ansible_version: ">=2.9,<2.10"

102
tests/azure/nightly.yml Normal file
View File

@@ -0,0 +1,102 @@
---
schedules:
- cron: "0 19 * * *"
displayName: Nightly Builds
branches:
include:
- master
always: true
trigger: none
pool:
vmImage: 'ubuntu-latest'
stages:
# Fedora
- stage: FedoraLatest_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: ">=2.9,<2.10"
- stage: FedoraLatest_Ansible_Core_2_11
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: "-core >=2.11,<2.12"
- stage: FedoraLatest_Ansible_latest
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: fedora-latest
ansible_version: ""
# CentOS 8
- stage: CentOS8_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-8
ansible_version: ">=2.9,<2.10"
- stage: CentOS8_Ansible_Core_2_11
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-8
ansible_version: "-core >=2.11,<2.12"
- stage: CentOS8_Ansible_latest
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-8
ansible_version: ""
# CentOS 7
- stage: CentOS7_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-7
ansible_version: ">=2.9,<2.10"
- stage: CentOS7_Ansible_Core_2_11
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-7
ansible_version: "-core >=2.11,<2.12"
- stage: CentOS7_Ansible_latest
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-7
ansible_version: ""

View File

@@ -5,6 +5,9 @@ parameters:
default: centos-8
- name: build_number
type: string
- name: ansible_version
type: string
default: ""
jobs:
- template: playbook_tests.yml
@@ -13,6 +16,7 @@ jobs:
number_of_groups: 3
build_number: ${{ parameters.build_number }}
scenario: ${{ parameters.scenario }}
ansible_version: ${{ parameters.ansible_version }}
- template: playbook_tests.yml
parameters:
@@ -20,6 +24,7 @@ jobs:
number_of_groups: 3
build_number: ${{ parameters.build_number }}
scenario: ${{ parameters.scenario }}
ansible_version: ${{ parameters.ansible_version }}
- template: playbook_tests.yml
parameters:
@@ -27,6 +32,7 @@ jobs:
number_of_groups: 3
build_number: ${{ parameters.build_number }}
scenario: ${{ parameters.scenario }}
ansible_version: ${{ parameters.ansible_version }}
- template: pytest_tests.yml
parameters:

View File

@@ -11,7 +11,7 @@ parameters:
default: centos-8
- name: ansible_version
type: string
default: ">=2.9,<2.10"
default: ""
- name: python_version
type: string
default: 3.6
@@ -34,8 +34,8 @@ jobs:
"ansible${{ parameters.ansible_version }}"
displayName: Install molecule and Ansible
- script: |
ansible-galaxy collection install community.docker
- script: ansible-galaxy collection install community.docker ansible.posix
displayName: Install Ansible collections
- script: pip install -r requirements-tests.txt
displayName: Install dependencies

View File

@@ -1,15 +1,15 @@
---
parameters:
- name: build_number
type: string
- name: scenario
type: string
- name: ansible_version
type: string
default: ">=2.9,<2.10"
- name: python_version
type: string
default: 3.6
- name: build_number
type: string
- name: scenario
type: string
- name: ansible_version
type: string
default: ""
- name: python_version
type: string
default: 3.6
jobs:
- job: Test_PyTests
@@ -26,8 +26,8 @@ jobs:
"ansible${{ parameters.ansible_version }}"
displayName: Install molecule and Ansible
- script: |
ansible-galaxy collection install community.docker
- script: ansible-galaxy collection install community.docker ansible.posix
displayName: Install Ansible collections
- script: pip install -r requirements-tests.txt
displayName: Install dependencies