Skip to content

Instantly share code, notes, and snippets.

@caiges
Last active December 28, 2018 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caiges/549255cef7fdc6e6b09a36cced6b0b7f to your computer and use it in GitHub Desktop.
Save caiges/549255cef7fdc6e6b09a36cced6b0b7f to your computer and use it in GitHub Desktop.
tags:
- infrastructure-deployer
variables:
ENV: ""
TERRAFORM_BRANCH: "master"
stages:
- clone
- image
- secrets
- build
clone_terraform:
stage: clone
script:
- git clone -b $TERRAFORM_BRANCH git@github.com:someorg/infrastructure.git
build_docker_image:
stage: image
script:
- cd infrastructure && make image
fetch_secrets:
stage: secrets
script:
- aws s3 cp s3://somebucket/somesecret somesecret
build_infrastructure:
stage: build
script:
- make init
- ENV=$ENV make workspace
- ENV=$ENV make apply
- ./slacksend.sh "#FFFF00" "Deploy API HOST: " `jq -r '.api_host.value' outputs.json`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment