Skip to content
代码片段 群组 项目
未验证 提交 cb7c5cf9 编辑于 作者: Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason 提交者: GitLab
浏览文件

Merge branch 'remove-fmt-terraform-modules-tmpl-job' into 'master'

Remove fmt job from Terraform Module CI/CD template

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149659



Merged-by: default avatarHordur Freyr Yngvason <hfyngvason@gitlab.com>
Approved-by: default avatarHordur Freyr Yngvason <hfyngvason@gitlab.com>
Co-authored-by: default avatarTimo Furrer <tfurrer@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -8,14 +8,10 @@ include:
- template: Jobs/SAST-IaC.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/SAST-IaC.gitlab-ci.yml
stages:
- validate
- build
- test
- deploy
fmt:
extends: .terraform-module:fmt
# See the included job template at `Terraform/Module-Base.gitlab-ci.yml` to learn about supported variables.
deploy:
extends: .terraform-module:deploy
......
......@@ -16,15 +16,6 @@ variables:
TERRAFORM_MODULE_SYSTEM: local # The system or provider your Terraform module targets (ex. local, aws, google).
TERRAFORM_MODULE_VERSION: ${CI_COMMIT_TAG} # The version - it's recommended to follow SemVer for Terraform Module Versioning.
.terraform-module:fmt:
stage: validate
image: $CI_TEMPLATE_REGISTRY_HOST/gitlab-org/terraform-images/stable:latest
variables:
TF_ROOT: $TERRAFORM_MODULE_DIR
script:
- gitlab-terraform fmt
allow_failure: true
.terraform-module:deploy:
stage: deploy
image: $CI_TEMPLATE_REGISTRY_HOST/gitlab-org/terraform-images/stable:latest
......
......@@ -10,9 +10,9 @@
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Terraform-Module') }
shared_examples 'on any branch' do
it 'creates fmt and kics job', :aggregate_failures do
it 'creates kics job', :aggregate_failures do
expect(pipeline.errors).to be_empty
expect(build_names).to include('fmt', 'kics-iac-sast')
expect(build_names).to include('kics-iac-sast')
end
it 'does not create a deploy job', :aggregate_failures do
......@@ -53,9 +53,9 @@
context 'when on tag' do
let(:pipeline_ref) { '1.0.0' }
it 'creates fmt and deploy job', :aggregate_failures do
it 'creates deploy job', :aggregate_failures do
expect(pipeline.errors).to be_empty
expect(build_names).to include('fmt', 'deploy')
expect(build_names).to include('deploy')
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册