Skip to content

Commit

Permalink
Release pipeline troubleshooting (#464)
Browse files Browse the repository at this point in the history
* missing permission & formatting

* fix prod backend deployment
  • Loading branch information
jdbass authored Jun 7, 2024
1 parent 9c76e11 commit f644721
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Get Artifact from Release
uses: dsaltares/fetch-gh-release-asset@master
with:
version: ${{ github.event.release.id }}
file: iac.zip

- name: Unzip Artifact
run: unzip iac.zip

- name: install opentofu
uses: opentofu/setup-opentofu@v1
with:
Expand All @@ -169,16 +178,18 @@ jobs:
terragrunt -v
- name: Get ECR tag from Release
id: get_ecr_tag
uses: dsaltares/fetch-gh-release-asset@master
with:
version: ${{ github.event.release.id }}
file: ecr_tag.zip
target: ./tofu/environments/prod/services/backend-service

- name: Unzip ECR tag
working-directory: ./tofu/environments/prod/services/backend-service
run: unzip ecr_tag.zip
id: get_ecr_tag
run: |
unzip ecr_tag.zip
output=$(cat ecr_tag.txt)
echo ecr_tag=$output >> $GITHUB_OUTPUT
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -192,7 +203,7 @@ jobs:
run: |
terragrunt init -upgrade
terragrunt validate
terragrunt plan -var "image=$(cat steps.get_ecr_tag.outputs.*)" -out tfplan
terragrunt plan -var "image=$(steps.get_ecr_tag.outputs.ecr_tag)" -out tfplan
cat tfplan
# terragrunt apply tfplan # will be re-enabled once release workflow is tested

0 comments on commit f644721

Please sign in to comment.