Commit 60ae9dea authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'update-terraform-template' into 'master'

Update Terraform.latest.gitlab-ci.yml template

See merge request gitlab-org/gitlab!71188
parents f0dbb59b a36e00c1
......@@ -7,20 +7,17 @@ include:
- template: Terraform/Base.latest.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Terraform/Base.latest.gitlab-ci.yml
stages:
- init
- validate
- build
- deploy
- cleanup
init:
extends: .terraform:init
fmt:
extends: .terraform:fmt
needs: []
validate:
extends: .terraform:validate
needs: []
build:
extends: .terraform:build
......
......@@ -21,18 +21,11 @@ cache:
paths:
- ${TF_ROOT}/.terraform/
.terraform:init: &terraform_init
stage: init
script:
- cd ${TF_ROOT}
- gitlab-terraform init
.terraform:fmt: &terraform_fmt
stage: validate
needs: []
script:
- cd ${TF_ROOT}
- gitlab-terraform fmt -check -recursive
- gitlab-terraform fmt
allow_failure: true
.terraform:validate: &terraform_validate
......
......@@ -27,7 +27,7 @@ RSpec.describe 'Terraform.latest.gitlab-ci.yml' do
context 'on master branch' do
it 'creates init, validate and build jobs', :aggregate_failures do
expect(pipeline.errors).to be_empty
expect(build_names).to include('init', 'validate', 'build', 'deploy')
expect(build_names).to include('validate', 'build', 'deploy')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment