Skip to content

Commit

Permalink
Ingress Route should also contain short sha
Browse files Browse the repository at this point in the history
  • Loading branch information
vv173 committed Aug 8, 2024
1 parent 7e958a8 commit 049e982
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
outputs:
preview_url: ${{ steps.print-preview-url.outputs.preview_url }}
pr_name: ${{ steps.sanitize_pr_name.outputs.PR_NAME }}
short_sha: ${{ steps.short_sha.outputs.SHORT_SHA }}
steps:
- name: Sanitize pull request Name
id: sanitize_pr_name
Expand Down Expand Up @@ -193,7 +194,7 @@ jobs:
shell: bash
working-directory: argo/cluster/${{ inputs.cluster_name }}/preview/${{ inputs.app_name }}
run: |
yq e -i '.spec.routes[0].match |= sub("pr-placeholder", "${{ needs.setup.outputs.pr_name }}")' routes.yaml
yq e -i '.spec.routes[0].match |= sub("pr-placeholder", "${{ needs.setup.outputs.pr_name }}-${{ needs.setup.outputs.short_sha }}")' routes.yaml
kustomize edit set namesuffix -- -${{ needs.setup.outputs.pr_name }}
kustomize edit set image ${{ inputs.app_name }}=${{ env.IMAGE_TAG }}
Expand Down

0 comments on commit 049e982

Please sign in to comment.