# infra {{{ .infra: &infra variables: PROJECT: "${INFRA_PROJECT}" cache: key: "${CI_BUILD_REF_NAME}_${INFRA_PROJECT}" paths: - "project/${INFRA_PROJECT}/build" # Compile jsonnet for `plan` infra_compile: <<: *infra stage: compile image: $JSONNET_DOCKER_IMAGE script: - make clean && make compile # Create a plan of changes for `apply` infra_terraform_plan: <<: *infra stage: plan image: $TERRAFORM_DOCKER_IMAGE script: - apk -U add make - make init && make plan # Apply the plan generated by the previous step infra_terraform_apply: <<: *infra stage: apply only: - master when: manual environment: name: infra url: $INFRA_URL image: $TERRAFORM_DOCKER_IMAGE script: - apk -U add make - make init - make apply # }}}