Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cbd69c20
Commit
cbd69c20
authored
Mar 09, 2020
by
Fábio Matavelli
Committed by
Fábio Matavelli
Mar 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply @alexives suggestions
parent
d1d459e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
+3
-4
No files found.
lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
View file @
cbd69c20
...
@@ -18,6 +18,8 @@ cache:
...
@@ -18,6 +18,8 @@ cache:
-
.terraform
-
.terraform
before_script
:
before_script
:
-
apk update && apk add jq
-
alias convert_report="jq '([.resource_changes[].change.actions] | flatten) | {\"create\"
:
(map(select(. == \"create\")) | length),\"update\":(map(select(. == \"update\")) | length),\"delete\"
:
(map(select(. == \"delete\")) | length)}'"
-
terraform --version
-
terraform --version
-
terraform init
-
terraform init
...
@@ -35,15 +37,12 @@ validate:
...
@@ -35,15 +37,12 @@ validate:
plan
:
plan
:
stage
:
build
stage
:
build
script
:
script
:
-
apk update && apk add jq
-
terraform plan -out=$PLAN
-
terraform plan -out=$PLAN
-
"
terraform
show
--json
$PLAN
|
jq
'([.resource_changes[].change.actions]
|
flatten)
|
{
\"
create
\"
:
(map(select(.
==
\"
create
\"
))
|
length),
\"
update
\"
:(map(select(.
==
\"
update
\"
))
|
length),
\"
delete
\"
:
(map(select(.
==
\"
delete
\"
))
|
length)}'
>
tfplan.json"
-
"
terraform
show
--json
$PLAN
|
convert_report
>
tfplan.json"
artifacts
:
artifacts
:
name
:
plan
name
:
plan
paths
:
paths
:
-
$PLAN
-
$PLAN
reports
:
terraform
:
tfplan.json
# Separate apply job for manual launching Terraform as it can be destructive
# Separate apply job for manual launching Terraform as it can be destructive
# action.
# action.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment