Skip to content

Commit

Permalink
chore: fix pipeline cd image reference (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
and-mora authored Nov 18, 2024
1 parent d21dbbe commit fb2f036
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:

outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
image: ${{ steps.stable_image.outputs.image }}
new_version: ${{ steps.semantic.outputs.new_release_version }}
digest: ${{ steps.stable_image.outputs.digest }}

steps:
#
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
ARM_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}"
run: |
terraform init -backend-config="env/dev/backend.tfvars" -reconfigure
terraform apply -var-file="env/dev/terraform.tfvars" -var="rtp_activator_image=${{ steps.rc-image.outputs.imageid }}" -auto-approve -lock-timeout=300s
terraform apply -var-file="env/dev/terraform.tfvars" -var="rtp_activator_image=ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }}-RC@${{ steps.rc-image.outputs.digest }}" -auto-approve -lock-timeout=300s
# #
# # Install Newman.
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
context: .
file: src/main/docker/Dockerfile
platforms: linux/amd64
tags: ghcr.io/${{ github.repository }}:latest, ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }}-RC
tags: ghcr.io/${{ github.repository }}:latest, ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }}
secrets: |
"gh_token=${{ secrets.GIT_PAT }}"
Expand All @@ -206,7 +207,7 @@ jobs:
ARM_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}"
run: |
terraform init -backend-config="env/dev/backend.tfvars" -reconfigure
terraform apply -var-file="env/dev/terraform.tfvars" -var="rtp_activator_image=${{ steps.stable_image.outputs.imageid }}" -auto-approve -lock-timeout=300s
terraform apply -var-file="env/dev/terraform.tfvars" -var="rtp_activator_image=ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }}@${{ steps.stable_image.outputs.digest }}" -auto-approve -lock-timeout=300s
uat_deployment:
Expand Down Expand Up @@ -248,4 +249,4 @@ jobs:
ARM_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}"
run: |
terraform init -backend-config="env/uat/backend.tfvars" -reconfigure
terraform apply -var-file="env/uat/terraform.tfvars" -var="rtp_activator_image=${{ needs.post_merge.outputs.image }}" -auto-approve -lock-timeout=300s
terraform apply -var-file="env/uat/terraform.tfvars" -var="rtp_activator_image=ghcr.io/${{ github.repository }}:${{ needs.post_merge.outputs.new_version }}@${{ needs.post_merge.outputs.digest }}" -auto-approve -lock-timeout=300s
2 changes: 1 addition & 1 deletion src/main/terraform/container_app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Container app.
# ------------------------------------------------------------------------------
resource "azurerm_container_app" "rtp-activator" {
name = "${local.project}-auth-ca"
name = "${local.project}-activator-ca"
container_app_environment_id = data.azurerm_container_app_environment.rtp-cae.id
resource_group_name = data.azurerm_container_app_environment.rtp-cae.resource_group_name
revision_mode = "Single"
Expand Down

0 comments on commit fb2f036

Please sign in to comment.