Skip to content

Commit

Permalink
Merge pull request #6 from code0-tech/reenable-colors-in-output
Browse files Browse the repository at this point in the history
Re-enable colors for terraform output
  • Loading branch information
Taucher2003 authored Feb 9, 2024
2 parents 3f4fcdc + 74638d5 commit dc71556
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ tf-plan:main:
- .tf
stage: terraform-plan
script:
- gitlab-terraform plan -no-color | tee output
- gitlab-terraform plan | tee output
- gitlab-terraform plan-json
- |
echo -e "\e[0Ksection_start:`date +%s`:glpa_summary\r\e[0KHeader of the summary"
grep -E "Plan:|No changes" output
grep -E "Plan:|No changes" output | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g"
echo -e "\e[0Ksection_end:`date +%s`:glpa_summary\r\e[0K"
artifacts:
expire_in: 7 days
Expand All @@ -39,10 +39,10 @@ tf-apply:main:
needs:
- tf-plan:main
script:
- gitlab-terraform apply -no-color | tee output
- gitlab-terraform apply | tee output
- |
echo -e "\e[0Ksection_start:`date +%s`:glpa_summary\r\e[0KHeader of the summary"
grep "Apply complete!" output
grep "Apply complete!" output | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g"
echo -e "\e[0Ksection_end:`date +%s`:glpa_summary\r\e[0K"
environment:
name: main
Expand Down

0 comments on commit dc71556

Please sign in to comment.