Skip to content
.gitlab-ci.yml 722 B
Newer Older
nimrod's avatar
nimrod committed
---
include:
  - project: shore/ci-templates
    file: templates/pre-commit.yml
  - project: shore/ci-templates
    file: templates/terraform.yml
nimrod's avatar
nimrod committed

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
nimrod's avatar
nimrod committed
  stage: test
nimrod's avatar
nimrod committed
  dependencies:
    - Generate payload

Terraform apply:
  extends: .tf_apply
nimrod's avatar
nimrod committed
  stage: deploy
nimrod's avatar
nimrod committed
  dependencies: &tf_apply_dependecies
    - Generate payload
    - Terraform plan
  needs: *tf_apply_dependecies