From 23109e8756eb3b3fb98ce02337cd93db1f767674 Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Wed, 18 Dec 2019 12:50:27 +0100 Subject: [PATCH] Export INVENTORY for helmrelease check --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1eb803045..dd502e6de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ variables: ADDRESS: "${CI_COMMIT_REF_SLUG}.ci.openappstack.net" ANSIBLE_HOST_KEY_CHECKING: "False" KANIKO_BUILD_IMAGENAME: "openappstack-ci" + INVENTORY: "/builds/openappstack/openappstack/clusters/${CI_COMMIT_REF_SLUG}/inventory.yml" default: image: "${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_SLUG}" @@ -99,7 +100,7 @@ test_helmreleases: script: - cd ansible/ - export KUBECONFIG="${PWD}/../clusters/${HOSTNAME}/secrets/kube_config_cluster.yml" - - pytest -v -s -m 'helmreleases' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' --reruns 120 --reruns-delay 10 + - pytest -v -s -m 'helmreleases' --connection=ansible --ansible-inventory=${INVENTORY} --hosts='ansible://*' --reruns 120 --reruns-delay 10 only: changes: - .gitlab-ci.yml @@ -113,7 +114,7 @@ testinfra: stage: health-test script: - cd ansible/ - - pytest -v -m 'testinfra' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' + - pytest -v -m 'testinfra' --connection=ansible --ansible-inventory=${INVENTORY} --hosts='ansible://*' only: changes: - .gitlab-ci.yml @@ -128,7 +129,7 @@ certs: allow_failure: true script: - cd ansible/ - - pytest -s -m 'certs' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' + - pytest -s -m 'certs' --connection=ansible --ansible-inventory=${INVENTORY} --hosts='ansible://*' only: changes: - .gitlab-ci.yml @@ -145,7 +146,7 @@ prometheus-alerts: allow_failure: true script: - cd test/ - - pytest -s -m 'prometheus' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' + - pytest -s -m 'prometheus' --connection=ansible --ansible-inventory=${INVENTORY} --hosts='ansible://*' only: changes: - .gitlab-ci.yml -- GitLab