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: ...@@ -53,17 +53,22 @@ release-image:
deploy-staging: deploy-staging:
<<: *runner_tags <<: *runner_tags
stage: deploy stage: deploy
before_script: image: registry.esss.lu.se/ics-docker/tower-cli:3.2
- apk add --update curl before_script: []
- curl -s -o /tmp/functions.sh ${ICS_SHARED_GITLAB_CI_FUNCTIONS}
- . /tmp/functions.sh
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: environment:
name: staging name: staging
url: https://csentry-test.esss.lu.se url: https://csentry-test.esss.lu.se
only: only:
- master - master
- tags
pages: pages:
<<: *runner_tags <<: *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