Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare v1.0.3 release #17

Merged
merged 5 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# UNRELEASED

# v1.0.3
* 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
* Adds run status check step to speculative run template by @mjyocca [#17](https://github.com/hashicorp/tfc-workflows-github/pull/17)

# v1.0.2
* 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

Expand Down
2 changes: 1 addition & 1 deletion actions/apply-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
2 changes: 1 addition & 1 deletion actions/cancel-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
2 changes: 1 addition & 1 deletion actions/create-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
2 changes: 1 addition & 1 deletion actions/discard-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
2 changes: 1 addition & 1 deletion actions/plan-output/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
2 changes: 1 addition & 1 deletion actions/show-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
2 changes: 1 addition & 1 deletion actions/upload-configuration/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ outputs:

runs:
using: docker
image: 'docker://hashicorp/tfci:v1.0.2'
image: 'docker://hashicorp/tfci:v1.0.3'
args:
- tfci
## global flags
Expand Down
6 changes: 3 additions & 3 deletions workflow-templates/terraform-cloud.apply-run.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.2
- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.3
id: upload
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}

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

- uses: hashicorp/tfc-workflows-github/actions/apply-run@v1.0.2
- uses: hashicorp/tfc-workflows-github/actions/apply-run@v1.0.3
id: apply
if: ${{ fromJSON(steps.create-run.outputs.payload).data.attributes.actions.IsConfirmable }}
with:
Expand Down
17 changes: 14 additions & 3 deletions workflow-templates/terraform-cloud.speculative-run.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.2
- uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.0.3
id: upload
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}
speculative: true

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

- uses: hashicorp/tfc-workflows-github/actions/plan-output@v1.0.2
- uses: hashicorp/tfc-workflows-github/actions/plan-output@v1.0.3
id: plan-output
with:
plan: ${{ steps.run.outputs.plan_id }}
Expand Down Expand Up @@ -97,3 +100,11 @@ jobs:
})
}

## Check Run Status, if not planned_and_finished fail the job
- id: terraform-cloud-check-run-status
if: ${{ steps.run.outputs.run_status != 'planned_and_finished'}}
run: |
echo "Terraform Cloud Run Failed or Requires Further Attention"
echo "Run Status: '${{ steps.run.outputs.run_status }}'"
echo "${{ steps.run.outputs.run_link }}"
exit 1