mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
Extend sanity tests to multiple ansible versions
This commit is contained in:
parent
efae528e70
commit
ee4ef2317d
7 changed files with 143 additions and 37 deletions
104
.gitlab-ci.yml
104
.gitlab-ci.yml
|
|
@ -2,47 +2,127 @@ stages:
|
|||
- sanity
|
||||
- integration
|
||||
|
||||
test:sanity1-devel-py38:
|
||||
test-sanity-devel-1/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh sanity/1
|
||||
- bash tests/utils/gitlab/gitlab.sh devel/sanity/1
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test:sanity2-devel-py38:
|
||||
test-sanity-devel-2/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh sanity/2
|
||||
- bash tests/utils/gitlab/gitlab.sh devel/sanity/2
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test:sanity3-devel-py38:
|
||||
test-sanity-devel-3/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh sanity/3
|
||||
- bash tests/utils/gitlab/gitlab.sh devel/sanity/3
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test:sanity4-devel-py38:
|
||||
test-sanity-devel-4/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh sanity/4
|
||||
- bash tests/utils/gitlab/gitlab.sh devel/sanity/4
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test:integration1-devel-py38:
|
||||
test-sanity-210-1/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/1
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-210-2/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/2
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-210-3/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/3
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-210-4/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/4
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-29-1/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/1
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-29-2/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/2
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-29-3/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/3
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-sanity-29-4/4:
|
||||
stage: sanity
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/4
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
test-integration-devel-1/2:
|
||||
stage: integration
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
|
|
@ -50,12 +130,12 @@ test:integration1-devel-py38:
|
|||
script:
|
||||
- echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt"
|
||||
- echo "py38-$CI_JOB_ID" >> "$(pwd)/prefix.txt"
|
||||
- bash tests/utils/gitlab/gitlab.sh integration/1
|
||||
- bash tests/utils/gitlab/gitlab.sh devel/hcloud/3.8/1
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
||||
|
||||
test:integration2-devel-py38:
|
||||
test-integration-devel-2/2:
|
||||
stage: integration
|
||||
image: python:3.8-buster
|
||||
except:
|
||||
|
|
@ -63,6 +143,6 @@ test:integration2-devel-py38:
|
|||
script:
|
||||
- echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt"
|
||||
- echo "py39-$CI_JOB_ID" >> "$(pwd)/prefix.txt"
|
||||
- bash tests/utils/gitlab/gitlab.sh integration/2
|
||||
- bash tests/utils/gitlab/gitlab.sh devel/hcloud/3.8/2
|
||||
tags:
|
||||
- hc-bladerunner
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ version: 0.1.0
|
|||
readme: README.md
|
||||
authors:
|
||||
- Lukas Kaemmerling (github.com/LKaemmerling)
|
||||
description: null
|
||||
description: A Collection for managing Hetzner Cloud resources
|
||||
license: GPL-3.0-or-later
|
||||
license_file: COPYING
|
||||
tags: null
|
||||
dependencies:
|
||||
ansible.netcommon: '>=0.0.1'
|
||||
|
|
|
|||
|
|
@ -8,13 +8,28 @@ matrix:
|
|||
exclude:
|
||||
- env: T=none
|
||||
include:
|
||||
- env: T=sanity/1
|
||||
- env: T=sanity/2
|
||||
- env: T=sanity/3
|
||||
- env: T=sanity/4
|
||||
- env: T=devel/sanity/1
|
||||
- env: T=devel/sanity/2
|
||||
- env: T=devel/sanity/3
|
||||
- env: T=devel/sanity/4
|
||||
|
||||
- env: T=hcloud/3.8/1
|
||||
- env: T=hcloud/3.8/2
|
||||
- env: T=devel/hcloud/3.8/1
|
||||
- env: T=devel/hcloud/3.8/2
|
||||
|
||||
|
||||
- env: T=2.10/sanity/1
|
||||
- env: T=2.10/sanity/2
|
||||
- env: T=2.10/sanity/3
|
||||
- env: T=2.10/sanity/4
|
||||
|
||||
- env: T=2.10/hcloud/3.8/1
|
||||
- env: T=2.10/hcloud/3.8/2
|
||||
|
||||
|
||||
- env: T=2.9/sanity/1
|
||||
- env: T=2.9/sanity/2
|
||||
- env: T=2.9/sanity/3
|
||||
- env: T=2.9/sanity/4
|
||||
|
||||
branches:
|
||||
except:
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
plugins/modules/hcloud_network_info.py validate-modules:return-syntax-error
|
||||
plugins/modules/hcloud_server.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/hcloud_server_network.py validate-modules:parameter-list-no-elements
|
||||
plugins/doc_fragments/hcloud.py future-import-boilerplate
|
||||
plugins/doc_fragments/hcloud.py metaclass-boilerplate
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
plugins/modules/hcloud_network_info.py validate-modules:return-syntax-error
|
||||
plugins/modules/hcloud_server.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/hcloud_server_network.py validate-modules:parameter-list-no-elements
|
||||
plugins/doc_fragments/hcloud.py future-import-boilerplate
|
||||
plugins/doc_fragments/hcloud.py metaclass-boilerplate
|
||||
|
|
@ -6,7 +6,16 @@ declare -a args
|
|||
|
||||
IFS='/:' read -ra args <<< "$1"
|
||||
|
||||
test="${args[0]}"
|
||||
ansible_version="${args[0]}"
|
||||
script="${args[1]}"
|
||||
|
||||
function join {
|
||||
local IFS="$1";
|
||||
shift;
|
||||
echo "$*";
|
||||
}
|
||||
|
||||
test="$(join / "${args[@]:1}")"
|
||||
command -v python
|
||||
python -V
|
||||
|
||||
|
|
@ -29,8 +38,11 @@ function retry
|
|||
command -v pip
|
||||
pip --version
|
||||
pip list --disable-pip-version-check
|
||||
retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
|
||||
if [ "${ansible_version}" == "devel" ]; then
|
||||
retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
else
|
||||
retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check
|
||||
fi
|
||||
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
|
||||
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
|
||||
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/hetzner/hcloud"
|
||||
|
|
|
|||
|
|
@ -5,9 +5,16 @@ set -o pipefail -eux
|
|||
declare -a args
|
||||
IFS='/:' read -ra args <<< "$1"
|
||||
|
||||
script="${args[0]}"
|
||||
ansible_version="${args[0]}"
|
||||
script="${args[1]}"
|
||||
|
||||
test="$1"
|
||||
function join {
|
||||
local IFS="$1";
|
||||
shift;
|
||||
echo "$*";
|
||||
}
|
||||
|
||||
test="$(join / "${args[@]:1}")"
|
||||
|
||||
docker images ansible/ansible
|
||||
docker images quay.io/ansible/*
|
||||
|
|
@ -45,8 +52,11 @@ function retry
|
|||
command -v pip
|
||||
pip --version
|
||||
pip list --disable-pip-version-check
|
||||
retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
|
||||
if [ "${ansible_version}" == "devel" ]; then
|
||||
retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
else
|
||||
retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check
|
||||
fi
|
||||
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
|
||||
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
|
||||
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/hetzner/hcloud"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue