diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 160006bff5d43e9e2bc1d4b2756833c579caa57c..f9b21e3eee354880c5cbee16d98562ec7482ac11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,7 @@ testinfra: - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - echo -e 'Host *\n stricthostkeychecking no' > ~/.ssh/config - cd ansible/ - - pytest -v -m 'testinfra' --connection=ansible --ansible-inventory=../clusters/$HOSTNAME/inventory.yml --hosts='ansible://*' + - pytest -v -m 'testinfra' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' only: changes: - .gitlab-ci.yml @@ -111,7 +111,7 @@ certs: - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - echo -e 'Host *\n stricthostkeychecking no' > ~/.ssh/config - cd ansible/ - - pytest -s -m 'certs' --connection=ansible --ansible-inventory=../clusters/$HOSTNAME/inventory.yml --hosts='ansible://*' + - pytest -s -m 'certs' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' only: changes: - .gitlab-ci.yml @@ -129,9 +129,10 @@ prometheus-alerts: - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - cd test/ - - py.test -s -m 'prometheus' --connection=ansible --ansible-inventory=./inventory.yml --hosts='ansible://*' + - pytest -s -m 'prometheus' --connection=ansible --ansible-inventory=../clusters/${HOSTNAME}/inventory.yml --hosts='ansible://*' only: changes: + - .gitlab-ci.yml - ansible/**/* - helmfiles/**/* - test/**/*