--- include: - project: shore/ci-templates file: templates/pre-commit.yml - project: shore/ci-templates file: templates/terraform.yml default: before_script: # yamllint disable-line rule:line-length - wget https://releases.hashicorp.com/terraform/0.15.3/terraform_0.15.3_linux_amd64.zip -O /tmp/terraform.zip - unzip /tmp/terraform.zip terraform -d /usr/local/bin/ - terraform version - rm -rf .terraform* - touch payload.zip Generate payload: stage: build image: registry.shore.co.il/ci-images:python3 variables: XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" before_script: - apt-get update - apt-get install -y zip script: make payload.zip artifacts: paths: - payload.zip cache: paths: - .cache/ Terraform plan: extends: .tf_plan stage: test dependencies: - Generate payload cache: paths: &tf_cache - .terraform - .terraform.lock.hcl Terraform apply: extends: .tf_apply stage: deploy dependencies: &tf_apply_dependecies - Generate payload - Terraform plan needs: *tf_apply_dependecies cache: paths: *tf_cache