image: alpine:latest stages: - test - build - deploy before_script: - apk update - apk upgrade - apk add --no-cache curl auto_update: image: hashicorp/terraform:full stage: test script: - apk add --no-cache bash git grep coreutils - curl -Lo /usr/local/bin/terraform-docs "https://github.com/$(curl -s https://github.com/segmentio/terraform-docs/releases | grep terraform-docs-v0.6.0-linux-amd | head -n 1 | cut -d '"' -f 2)" - chmod +x /usr/local/bin/terraform-docs - ./scripts/auto_update.sh ./ - git status - git diff --exit-code tags: - product-teams - kubernetes - gke deploy_terraform: stage: deploy script: - "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: - "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=MON-182_minimal_v1 -F \"variables[SCENARIO]=build\" -F \"variables[TAG]=$CI_COMMIT_TAG\" https://git.fr.clara.net/api/v4/projects/513/trigger/pipeline" only: - tags except: - branches tags: - product-teams - kubernetes - gke