Skip to content
Snippets Groups Projects
Commit dba26456 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Use tower-cli to trigger Ansible job

tower-cli easily allows to:
- pass extra variables to the job
- wait for the job to complete

Deploy to staging on tags as well.
parent d0dfa712
No related branches found
No related tags found
No related merge requests found
......@@ -53,17 +53,22 @@ release-image:
deploy-staging:
<<: *runner_tags
stage: deploy
before_script:
- apk add --update curl
- curl -s -o /tmp/functions.sh ${ICS_SHARED_GITLAB_CI_FUNCTIONS}
- . /tmp/functions.sh
image: registry.esss.lu.se/ics-docker/tower-cli:3.2
before_script: []
script:
- launch_job_template deploy-csentry-staging
- >
tower-cli job launch
-h icsv-awx01.esss.lu.se
-u ${ANSIBLE_AWX_USERNAME}
-p ${ANSIBLE_AWX_PASSWORD}
-J deploy-csentry-staging
-e "csentry_tag=$CI_COMMIT_REF_NAME" --monitor
environment:
name: staging
url: https://csentry-test.esss.lu.se
only:
- master
- tags
pages:
<<: *runner_tags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment