From 32900e126ccd93cbdc681413d4af3b782ae154a8 Mon Sep 17 00:00:00 2001
From: Benjamin Bertrand <benjamin.bertrand@esss.se>
Date: Thu, 15 Feb 2018 12:08:25 +0100
Subject: [PATCH] Add manual job to deploy to production

---
 .gitlab-ci.yml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2dcd8d0..ec17fbf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -85,3 +85,23 @@ pages:
   # Don't forget to update if not only deploying docs for tags
   only:
     - tags
+
+deploy-production:
+  <<: *runner_tags
+  stage: deploy
+  image: registry.esss.lu.se/ics-docker/tower-cli:3.2
+  before_script: []
+  script:
+    - >
+      tower-cli job launch
+      -h icsv-awx01.esss.lu.se
+      -u ${ANSIBLE_AWX_USERNAME}
+      -p ${ANSIBLE_AWX_PASSWORD}
+      -J deploy-csentry
+      -e "csentry_tag=$CI_COMMIT_TAG" --monitor
+  environment:
+    name: production
+    url: https://csentry.esss.lu.se
+  only:
+    - tags
+  when: manual
-- 
GitLab