diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa4a1a0..d0d2f30 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,28 @@ stages: - test -test: +test:integration-ansible-devel-py-38: stage: test image: python:3.8-buster except: - tags script: - echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt" - - cat "$(pwd)/hcloud_token.txt" - - export HOSTNAME="gitlab-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)" + - echo "py39-CI_JOB_ID" >> "$(pwd)/prefix.txt" + - bash tests/utils/gitlab/gitlab.sh + tags: + - hc-bladerunner + + +test:integration-ansible-devel-py-39: + stage: test + image: python:3.9-rc-buster + allow_failure: true + except: + - tags + script: + - echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt" + - echo "py39-CI_JOB_ID" >> "$(pwd)/prefix.txt" - bash tests/utils/gitlab/gitlab.sh tags: - hc-bladerunner diff --git a/tests/utils/gitlab/hcloud.sh b/tests/utils/gitlab/hcloud.sh index d277c01..e2df26d 100755 --- a/tests/utils/gitlab/hcloud.sh +++ b/tests/utils/gitlab/hcloud.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash -cloud="hcloud" -python="3.8" - -target="cloud/hcloud/" -HCLOUD_TOKEN= $(cat hcloud_token.txt) +HCLOUD_TOKEN=$(cat hcloud_token.txt) changed_all_target="shippable/${cloud}/smoketest/" echo "[default] @@ -12,6 +8,6 @@ hcloud_api_token=${HCLOUD_TOKEN} " >> $(pwd)/tests/integration/cloud-config-hcloud.ini # shellcheck disable=SC2086 export SHIPPABLE="true" -export SHIPPABLE_BUILD_NUMBER="gl-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1)" +export SHIPPABLE_BUILD_NUMBER="gl-$(cat prefix.txt)" export SHIPPABLE_JOB_NUMBER="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 2 | head -n 1)" -ansible-test integration --color --local -v "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} +ansible-test integration --color --local -v "cloud/hcloud/" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"}