From 99f81451f7886abe555d2733eb1ed9b48e929337 Mon Sep 17 00:00:00 2001 From: Justin Woodson Date: Tue, 10 Dec 2024 12:18:57 -0500 Subject: [PATCH] Update namespace prefix in workflows and adjust PR teardown script --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/deploy_to_eks.yml | 13 ++++++++++++- .github/workflows/pr_teardown_env_on_close.yml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index bd33eb0cb..cb64a2a08 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -33,4 +33,4 @@ jobs: needs: [Build_Application_Images,Build_easi-frontend_image] secrets: inherit with: - namespace: easi-pr-${{ github.event.number }} + namespace: easi-${{ github.event.number }} diff --git a/.github/workflows/deploy_to_eks.yml b/.github/workflows/deploy_to_eks.yml index 6ad488099..173ed1b89 100644 --- a/.github/workflows/deploy_to_eks.yml +++ b/.github/workflows/deploy_to_eks.yml @@ -11,6 +11,7 @@ on: permissions: id-token: write contents: read + pull-requests: write env: GIT_HASH: ${{ github.sha }} @@ -46,11 +47,21 @@ jobs: echo "- [EASi](http://${EASI_INGRESS})" >> $GITHUB_STEP_SUMMARY echo "- [Mailcatcher](http://${EMAIL_INGRESS})" >> $GITHUB_STEP_SUMMARY echo "- [Minio Console](http://${MINIO_CONSOLE_INGRESS})" >> $GITHUB_STEP_SUMMARY - + + #TODO: Remove this step + - name: Set outputs + id: set-outputs + run: | + echo "${{ github.event }}" + echo "${{ github.event_name }}" + echo "${{ github.event.pull_request }}" + - name: Comment on PR if: github.event_name == 'pull_request' uses: thollander/actions-comment-pull-request@v3 with: + comment-tag: ingress-urls message: | Hello world ! :wave: + This is a comment on ${{ github.event.number }} reactions: eyes, rocket diff --git a/.github/workflows/pr_teardown_env_on_close.yml b/.github/workflows/pr_teardown_env_on_close.yml index eeac85bef..f7e18bb88 100644 --- a/.github/workflows/pr_teardown_env_on_close.yml +++ b/.github/workflows/pr_teardown_env_on_close.yml @@ -32,4 +32,4 @@ jobs: - name: Teardown branch environment # The "easi-pr-" prefix needs to match the prefix in build_and_test.yml so that we delete the correct namespace run: | - kubectl delete namespace "easi-pr-$PR_NUMBER" --force --ignore-not-found + kubectl delete namespace "easi-$PR_NUMBER" --force --ignore-not-found