Update .gitlab-ci.yml
This commit is contained in:
@@ -30,7 +30,11 @@ plan:
|
|||||||
- alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
|
- alias convert_report="jq -r '([.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 -reconfigure -backend-config="address=${GITLAB_TF_ADDRESS}" -backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="username=gitlab-ci-token" -backend-config="password=${CI_JOB_TOKEN}" -backend-config="lock_method=POST" -backend-config="unlock_method=DELETE" -backend-config="retry_wait_min=5"
|
- terraform init -reconfigure -backend-config="address=${GITLAB_TF_ADDRESS}" -backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="username=gitlab-ci-token" -backend-config="password=${CI_JOB_TOKEN}" -backend-config="lock_method=POST" -backend-config="unlock_method=DELETE" -backend-config="retry_wait_min=5"
|
||||||
- terraform plan -var-file=terraform.tfvars
|
- terraform plan -var-file=terraform.tfvars -out=$PLAN
|
||||||
|
- terraform show --json $PLAN | convert_report > $PLAN_JSON
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
terraform: $PLAN_JSON
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- terraform.tf
|
- terraform.tf
|
||||||
@@ -140,4 +144,4 @@ ansible-update-dns:
|
|||||||
- ansible-playbook $CI_PROJECT_DIR/jobs/dns.yml
|
- ansible-playbook $CI_PROJECT_DIR/jobs/dns.yml
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- jobs/dns.yml
|
- jobs/dns.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user