From 2e6ff3a5cf8c57877629f09df1c031eb1379b356 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Fri, 3 May 2019 19:19:09 +0200 Subject: [PATCH] MON-449 global ci to build template stack and terraform apply --- .gitlab-ci.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 087b35a..81723a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,8 +2,10 @@ image: hashicorp/terraform:full stages: - test + - build + - deploy -test_auto_update: +auto_update: stage: test script: - apk update @@ -18,3 +20,33 @@ test_auto_update: - product-teams - kubernetes - gke + +deploy_terraform: + stage: deploy + script: + - apk update + - apk upgrade + - apk add --no-cache curl + - "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=MON-182_minimal_v1 -F 'variables[SCENARIO]=test' https://git.fr.clara.net/api/v4/projects/513/trigger/pipeline" + only: + - master + tags: + - product-teams + - kubernetes + - gke + +build_template: + stage: build + script: + - apk update + - apk upgrade + - apk add --no-cache curl + - "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=MON-182_minimal_v1 -F 'variables[SCENARIO]=build' https://git.fr.clara.net/api/v4/projects/513/trigger/pipeline" + only: + - tags + except: + - branches + tags: + - product-teams + - kubernetes + - gke