Skip to content

Commit b5ae00d

Browse files
authored
Prepare v1.0.3 release (#17)
* update docker image tag version * update templates to reference v1.0.3 * update speculative workflow template to include run status check step * add changelog entry for v1.0.3 release * add changelog entry for speculative template modification
1 parent e4f1e37 commit b5ae00d

10 files changed

Lines changed: 28 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# UNRELEASED
22

3+
# v1.0.3
4+
* Bug fixes and enhancements from [tfc-workflows-tolling@v1.0.3](https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.0.3) version bump
5+
* Adds run status check step to speculative run template by @mjyocca [#17](https://github.com/hashicorp/tfc-workflows-github/pull/17)
6+
37
# v1.0.2
48
* Bug fixes and enhancements from [tfc-workflows-tooling@v1.0.2](https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.0.2) version bump
59

actions/apply-run/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ outputs:
3838

3939
runs:
4040
using: docker
41-
image: 'docker://hashicorp/tfci:v1.0.2'
41+
image: 'docker://hashicorp/tfci:v1.0.3'
4242
args:
4343
- tfci
4444
## global flags

actions/cancel-run/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ outputs:
3636

3737
runs:
3838
using: docker
39-
image: 'docker://hashicorp/tfci:v1.0.2'
39+
image: 'docker://hashicorp/tfci:v1.0.3'
4040
args:
4141
- tfci
4242
## global flags

actions/create-run/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ outputs:
6262

6363
runs:
6464
using: docker
65-
image: 'docker://hashicorp/tfci:v1.0.2'
65+
image: 'docker://hashicorp/tfci:v1.0.3'
6666
args:
6767
- tfci
6868
## global flags

actions/discard-run/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ outputs:
3636

3737
runs:
3838
using: docker
39-
image: 'docker://hashicorp/tfci:v1.0.2'
39+
image: 'docker://hashicorp/tfci:v1.0.3'
4040
args:
4141
- tfci
4242
## global flags

actions/plan-output/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ outputs:
3939

4040
runs:
4141
using: docker
42-
image: 'docker://hashicorp/tfci:v1.0.2'
42+
image: 'docker://hashicorp/tfci:v1.0.3'
4343
args:
4444
- tfci
4545
## global flags

actions/show-run/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ outputs:
4848

4949
runs:
5050
using: docker
51-
image: 'docker://hashicorp/tfci:v1.0.2'
51+
image: 'docker://hashicorp/tfci:v1.0.3'
5252
args:
5353
- tfci
5454
## global flags

actions/upload-configuration/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ outputs:
4343

4444
runs:
4545
using: docker
46-
image: 'docker://hashicorp/tfci:v1.0.2'
46+
image: 'docker://hashicorp/tfci:v1.0.3'
4747
args:
4848
- tfci
4949
## global flags

workflow-templates/terraform-cloud.apply-run.workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ jobs:
4141
steps:
4242
- uses: actions/checkout@v3
4343

44-
- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.2
44+
- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.3
4545
id: upload
4646
with:
4747
workspace: ${{ env.TF_WORKSPACE }}
4848
directory: ${{ env.CONFIG_DIRECTORY }}
4949

50-
- uses: hashicorp/tfc-workflows-github/actions/create-run@v1.0.2
50+
- uses: hashicorp/tfc-workflows-github/actions/create-run@v1.0.3
5151
id: create-run
5252
with:
5353
workspace: ${{ env.TF_WORKSPACE }}
5454
configuration_version: ${{ steps.upload.outputs.configuration_version_id }}
5555

56-
- uses: hashicorp/tfc-workflows-github/actions/apply-run@v1.0.2
56+
- uses: hashicorp/tfc-workflows-github/actions/apply-run@v1.0.3
5757
id: apply
5858
if: ${{ fromJSON(steps.create-run.outputs.payload).data.attributes.actions.IsConfirmable }}
5959
with:

workflow-templates/terraform-cloud.speculative-run.workflow.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,18 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v3
3939

40-
- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.2
40+
- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.3
4141
id: upload
4242
with:
4343
workspace: ${{ env.TF_WORKSPACE }}
4444
directory: ${{ env.CONFIG_DIRECTORY }}
4545
speculative: true
4646

47-
- uses: hashicorp/tfc-workflows-github/actions/create-run@v1.0.2
47+
- uses: hashicorp/tfc-workflows-github/actions/create-run@v1.0.3
4848
id: run
49+
## run may fail, if so continue to output PR comment
50+
## step.terraform-cloud-check-run-status will fail job after pr comment is created/updated.
51+
continue-on-error: true
4952
with:
5053
workspace: ${{ env.TF_WORKSPACE }}
5154
configuration_version: ${{ steps.upload.outputs.configuration_version_id }}
@@ -54,7 +57,7 @@ jobs:
5457
## Example:
5558
# message: "Triggered From GitHub Actions CI ${{ github.sha }}"
5659

57-
- uses: hashicorp/tfc-workflows-github/actions/plan-output@v1.0.2
60+
- uses: hashicorp/tfc-workflows-github/actions/plan-output@v1.0.3
5861
id: plan-output
5962
with:
6063
plan: ${{ steps.run.outputs.plan_id }}
@@ -97,3 +100,11 @@ jobs:
97100
})
98101
}
99102
103+
## Check Run Status, if not planned_and_finished fail the job
104+
- id: terraform-cloud-check-run-status
105+
if: ${{ steps.run.outputs.run_status != 'planned_and_finished'}}
106+
run: |
107+
echo "Terraform Cloud Run Failed or Requires Further Attention"
108+
echo "Run Status: '${{ steps.run.outputs.run_status }}'"
109+
echo "${{ steps.run.outputs.run_link }}"
110+
exit 1

0 commit comments

Comments
 (0)