Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Azure Pipelines #155

Merged
merged 2 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .azure-pipelines/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Azure Pipelines Configuration

Please see the [Documentation](https://github.com/ansible/community/wiki/Testing:-Azure-Pipelines) for more information.
224 changes: 120 additions & 104 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,52 +36,48 @@ variables:
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:1.6.0
image: quay.io/ansible/azure-pipelines-test-container:1.7.0

pool: Standard

stages:
- stage: Sanity_devel
displayName: Sanity devel
### Sanity & units
- stage: Ansible_devel
displayName: Sanity & Units devel
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: devel/sanity/{0}
targets:
- test: 1
- test: extra
- stage: Units_devel
displayName: Units devel
- name: Sanity
test: 'devel/sanity/1'
- name: Sanity Extra # Only on devel
test: 'devel/sanity/extra'
- name: Units
test: 'devel/units/1'
- stage: Ansible_2_10
displayName: Sanity & Units 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: devel/units/{0}/1
targets:
- test: ''
- stage: Remote_devel
displayName: Remote devel
- name: Sanity
test: '2.10/sanity/1'
- name: Units
test: '2.10/units/1'
- stage: Ansible_2_9
displayName: Sanity & Units 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: devel/{0}/1
targets:
- name: OS X 10.11
test: osx/10.11
- name: macOS 10.15
test: macos/10.15
- name: RHEL 7.8
test: rhel/7.8
- name: RHEL 8.2
test: rhel/8.2
- name: FreeBSD 11.1
test: freebsd/11.1
- name: FreeBSD 12.1
test: freebsd/12.1
- name: Sanity
test: '2.9/sanity/1'
- name: Units
test: '2.9/units/1'
### Docker
- stage: Docker_devel
displayName: Docker devel
dependsOn: []
Expand Down Expand Up @@ -110,137 +106,157 @@ stages:
test: ubuntu1604
- name: Ubuntu 18.04
test: ubuntu1804
- stage: Cloud_devel
displayName: Cloud devel
- stage: Docker_2_10
displayName: Docker 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: devel/cloud/{0}/1
testFormat: 2.10/linux/{0}/1
targets:
- test: 2.6
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
- stage: Sanity_2_10
displayName: Sanity 2.10
- name: CentOS 6
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 30
test: fedora30
- name: Fedora 31
test: fedora31
- name: Fedora 32
test: fedora32
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 16.04
test: ubuntu1604
- name: Ubuntu 18.04
test: ubuntu1804
- stage: Docker_2_9
displayName: Docker 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test 1 {0}
testFormat: 2.10/sanity/1/{0}
testFormat: 2.9/linux/{0}/1
targets:
- test: ''
- stage: Units_2_10
displayName: Units 2.10
- name: CentOS 6
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 30
test: fedora30
- name: Fedora 31
test: fedora31
# fedora32 doesn't exist in 2.9
# - name: Fedora 32
# test: fedora32
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 16.04
test: ubuntu1604
- name: Ubuntu 18.04
test: ubuntu1804

### Remote
- stage: Remote_devel
displayName: Remote devel
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.10/units/{0}/1
testFormat: devel/{0}/1
targets:
- test: ''
- name: OS X 10.11
test: osx/10.11
- name: macOS 10.15
test: macos/10.15
- name: RHEL 7.8
test: rhel/7.8
- name: RHEL 8.2
test: rhel/8.2
- name: FreeBSD 11.1
test: freebsd/11.1
- name: FreeBSD 12.1
test: freebsd/12.1
- stage: Remote_2_10
displayName: Remote 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: RHEL 7.8 {0}
testFormat: 2.10/rhel/7.8/{0}/1
targets:
- test: ''
- stage: Docker_2_10
displayName: Docker 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Ubuntu 18.04 {0}
testFormat: 2.10/linux/ubuntu1804/{0}/1
testFormat: 2.10/{0}/1
targets:
- test: ''
- stage: Cloud_2_10
displayName: Cloud 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python 3.6 {0}
testFormat: 2.10/cloud/3.6/{0}/1
targets:
- test: ''
- stage: Sanity_2_9
displayName: Sanity 2.9
- name: RHEL 7.8
test: rhel/7.8
- stage: Remote_2_9
displayName: Remote 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test 1 {0}
testFormat: 2.9/sanity/1/{0}
testFormat: 2.9/{0}/1
targets:
- test: ''
- stage: Units_2_9
displayName: Units 2.9
- name: 'RHEL 7.8'
test: 'rhel/7.8'
### cloud
- stage: Cloud_devel
displayName: Cloud devel
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.9/units/{0}/1
targets:
- test: ''
- stage: Remote_2_9
displayName: Remote 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: RHEL 7.8 {0}
testFormat: 2.9/rhel/7.8/{0}/1
testFormat: devel/cloud/{0}/1
targets:
- test: ''
- stage: Docker_2_9
displayName: Docker 2.9
- test: 2.6
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
- stage: Cloud_2_10
displayName: Cloud 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Ubuntu 18.04 {0}
testFormat: 2.9/linux/ubuntu1804/{0}/1
nameFormat: Python {0}
testFormat: 2.10/cloud/{0}/1
targets:
- test: ''
- test: 3.6
- stage: Cloud_2_9
displayName: Cloud 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python 3.5 {0}
testFormat: 2.9/cloud/3.5/{0}/1
nameFormat: Python {0}
testFormat: 2.9/cloud/{0}/1
targets:
- test: ''
- test: 3.5

## Finally

- stage: Summary
condition: succeededOrFailed()
dependsOn:
- Sanity_devel
- Units_devel
- Ansible_devel
- Ansible_2_10
- Ansible_2_9
- Remote_devel
- Docker_devel
- Cloud_devel
- Sanity_2_10
- Units_2_10
- Remote_2_10
- Docker_2_10
- Cloud_2_10
- Sanity_2_9
- Units_2_9
- Remote_2_9
- Docker_2_9
- Cloud_2_9
Expand Down
25 changes: 18 additions & 7 deletions tests/utils/shippable/shippable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ function join {
echo "$*";
}

test="$(join / "${args[@]:1}")"
# HACK remove once azure-pipelines-test-container has been fixed
export PATH=$PATH:$HOME/.local/bin

# Ensure we can write other collections to this dir
sudo chown "$(whoami)" "${PWD}/../../"

test="$(join / "${args[@]:1}")"
docker images ansible/ansible
docker images quay.io/ansible/*
docker ps
Expand Down Expand Up @@ -69,12 +74,18 @@ if [ "${script}" == "osx" ] && [ "${ansible_version}" == "2.9" ]; then
fi
# END: HACK

export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
mkdir -p "${TEST_DIR}"
cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
cd "${TEST_DIR}"

if [ "${SHIPPABLE_BUILD_ID:-}" ]; then
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
mkdir -p "${TEST_DIR}"
cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
cd "${TEST_DIR}"
else
# AZP
export ANSIBLE_COLLECTIONS_PATHS="$PWD/../../../"
fi

# START: HACK install integration test dependencies
if [ "${script}" != "units" ] && [ "${script}" != "sanity" ] && [ "${ansible_version}" != "2.9" ]; then
Expand Down