From 228348a501ad3de229447795c5a483eed8abfcba Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 22:40:52 -0700 Subject: [PATCH 1/8] Troubleshoot deploy outputs --- .github/workflows/pr-open.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 3c130a06a..cf97b8069 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -46,16 +46,24 @@ jobs: tests: name: Tests - if: needs.deploys.triggered == 'true' needs: [deploys] - uses: ./.github/workflows/.tests.yml - with: - target: ${{ github.event.number }} - - results: - name: PR Results - if: always() && !failure() - needs: [tests] + if: always() runs-on: ubuntu-22.04 steps: - - run: echo "Workflow completed successfully!" + - run: echo "needs.deploys.triggered == ${{ needs.deploys.triggered }}" + + # tests: + # name: Tests + # if: needs.deploys.triggered == 'true' + # needs: [deploys] + # uses: ./.github/workflows/.tests.yml + # with: + # target: ${{ github.event.number }} + + # results: + # name: PR Results + # if: always() && !failure() + # needs: [builds, deploys, tests] + # runs-on: ubuntu-22.04 + # steps: + # - run: echo "Workflow completed successfully!" From c7ac2a512e20907219b512cea7dc5179203d6a82 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 22:49:27 -0700 Subject: [PATCH 2/8] Trigger --- .github/workflows/pr-open.yml | 44 +++++++++++++++++------------------ frontend/trigger.out | 0 2 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 frontend/trigger.out diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index cf97b8069..e664095f7 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -9,32 +9,32 @@ concurrency: cancel-in-progress: true jobs: - # https://github.com/bcgov-nr/action-builder-ghcr - builds: - name: Builds - runs-on: ubuntu-22.04 - permissions: - packages: write - outputs: - digest: ${{ steps.builds.outputs.digest }} - strategy: - matrix: - package: [backend, frontend, migrations] - timeout-minutes: 10 - steps: - - uses: bcgov-nr/action-builder-ghcr@v2.0.2 - id: builds - with: - keep_versions: 50 - package: ${{ matrix.package }} - tag: ${{ github.event.number }} - tag_fallback: latest - triggers: ('${{ matrix.package }}/') + # # https://github.com/bcgov-nr/action-builder-ghcr + # builds: + # name: Builds + # runs-on: ubuntu-22.04 + # permissions: + # packages: write + # outputs: + # digest: ${{ steps.builds.outputs.digest }} + # strategy: + # matrix: + # package: [backend, frontend, migrations] + # timeout-minutes: 10 + # steps: + # - uses: bcgov-nr/action-builder-ghcr@v2.0.2 + # id: builds + # with: + # keep_versions: 50 + # package: ${{ matrix.package }} + # tag: ${{ github.event.number }} + # tag_fallback: latest + # triggers: ('${{ matrix.package }}/') # https://github.com/bcgov-nr/action-deployer-openshift deploys: name: Deploys - needs: [builds] + # needs: [builds] uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.0 secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} diff --git a/frontend/trigger.out b/frontend/trigger.out new file mode 100644 index 000000000..e69de29bb From d1a5a7a7ba93cc51b503f34b433d0ee942c8caba Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 23:19:20 -0700 Subject: [PATCH 3/8] Outputs --- .github/workflows/pr-open.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index e664095f7..e11575b97 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -50,11 +50,11 @@ jobs: if: always() runs-on: ubuntu-22.04 steps: - - run: echo "needs.deploys.triggered == ${{ needs.deploys.triggered }}" + - run: echo "needs.deploys.outputs.triggered == ${{ needs.deploys.outputs.triggered }}" # tests: # name: Tests - # if: needs.deploys.triggered == 'true' + # if: needs.deploys.outputs.triggered == 'true' # needs: [deploys] # uses: ./.github/workflows/.tests.yml # with: From 67695d668111ced70fce0829a03406e4841b5647 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 23:23:09 -0700 Subject: [PATCH 4/8] Bump helper versions --- .github/workflows/merge.yml | 4 ++-- .github/workflows/pr-close.yml | 2 +- .github/workflows/pr-open.yml | 2 +- .github/workflows/pr-validate.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 587549bab..e4dc39418 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -36,7 +36,7 @@ jobs: # https://github.com/bcgov-nr/action-deployer-openshift deploy-test: name: Deploy (test) - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.0 + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.1 secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} oc_token: ${{ secrets.OC_TOKEN }} @@ -46,7 +46,7 @@ jobs: deploy-prod: name: Deploy (prod) needs: [deploy-test, vars] - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.0 + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.1 secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} oc_token: ${{ secrets.OC_TOKEN }} diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index f024a0d9f..3abbc4752 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -12,7 +12,7 @@ concurrency: jobs: cleanup: name: Cleanup and Images - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-close.yml@v0.4.0 + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-close.yml@v0.4.1 secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} oc_token: ${{ secrets.OC_TOKEN }} diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index e11575b97..8c29697cf 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -35,7 +35,7 @@ jobs: deploys: name: Deploys # needs: [builds] - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.0 + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.1 secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} oc_token: ${{ secrets.OC_TOKEN }} diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index 69e2bf449..6c15488f5 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -12,7 +12,7 @@ jobs: validate: name: Validate PR if: (! github.event.pull_request.draft) - uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@v0.4.0 + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@v0.4.1 with: markdown_links: | - [Frontend](https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca) From 8819d249ca7128eab6ae86cdfa6545bec2bb6c94 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 23:27:45 -0700 Subject: [PATCH 5/8] Restore results and tests jobs --- .github/workflows/pr-open.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 8c29697cf..e906d2098 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -46,24 +46,16 @@ jobs: tests: name: Tests + if: needs.deploys.outputs.triggered == 'true' needs: [deploys] - if: always() + uses: ./.github/workflows/.tests.yml + with: + target: ${{ github.event.number }} + + results: + name: PR Results + if: always() && !failure() + needs: [builds, deploys, tests] runs-on: ubuntu-22.04 steps: - - run: echo "needs.deploys.outputs.triggered == ${{ needs.deploys.outputs.triggered }}" - - # tests: - # name: Tests - # if: needs.deploys.outputs.triggered == 'true' - # needs: [deploys] - # uses: ./.github/workflows/.tests.yml - # with: - # target: ${{ github.event.number }} - - # results: - # name: PR Results - # if: always() && !failure() - # needs: [builds, deploys, tests] - # runs-on: ubuntu-22.04 - # steps: - # - run: echo "Workflow completed successfully!" + - run: echo "Workflow completed successfully!" From 26888a9cb36d45a59e7d19f40e9011d666a16d95 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 23:29:02 -0700 Subject: [PATCH 6/8] Restore results and tests jobs --- .github/workflows/pr-open.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index e906d2098..4a5ded0ed 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -55,7 +55,8 @@ jobs: results: name: PR Results if: always() && !failure() - needs: [builds, deploys, tests] + # needs: [builds, deploys, tests] + needs: [deploys, tests] runs-on: ubuntu-22.04 steps: - run: echo "Workflow completed successfully!" From 9b354dbd2d262c2d33a60c7aa98e920c5cfba0e8 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 23:36:12 -0700 Subject: [PATCH 7/8] Restore build job --- .github/workflows/pr-open.yml | 47 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 4a5ded0ed..2902907ae 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -9,32 +9,32 @@ concurrency: cancel-in-progress: true jobs: - # # https://github.com/bcgov-nr/action-builder-ghcr - # builds: - # name: Builds - # runs-on: ubuntu-22.04 - # permissions: - # packages: write - # outputs: - # digest: ${{ steps.builds.outputs.digest }} - # strategy: - # matrix: - # package: [backend, frontend, migrations] - # timeout-minutes: 10 - # steps: - # - uses: bcgov-nr/action-builder-ghcr@v2.0.2 - # id: builds - # with: - # keep_versions: 50 - # package: ${{ matrix.package }} - # tag: ${{ github.event.number }} - # tag_fallback: latest - # triggers: ('${{ matrix.package }}/') + # https://github.com/bcgov-nr/action-builder-ghcr + builds: + name: Builds + runs-on: ubuntu-22.04 + permissions: + packages: write + outputs: + digest: ${{ steps.builds.outputs.digest }} + strategy: + matrix: + package: [backend, frontend, migrations] + timeout-minutes: 10 + steps: + - uses: bcgov-nr/action-builder-ghcr@v2.0.2 + id: builds + with: + keep_versions: 50 + package: ${{ matrix.package }} + tag: ${{ github.event.number }} + tag_fallback: latest + triggers: ('${{ matrix.package }}/') # https://github.com/bcgov-nr/action-deployer-openshift deploys: name: Deploys - # needs: [builds] + needs: [builds] uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.1 secrets: oc_namespace: ${{ secrets.OC_NAMESPACE }} @@ -55,8 +55,7 @@ jobs: results: name: PR Results if: always() && !failure() - # needs: [builds, deploys, tests] - needs: [deploys, tests] + needs: [builds, deploys, tests] runs-on: ubuntu-22.04 steps: - run: echo "Workflow completed successfully!" From e60aae5b26c0874a3c50e1236fe6584431647dbf Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Thu, 18 Apr 2024 23:37:01 -0700 Subject: [PATCH 8/8] Remove trigger --- frontend/trigger.out | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 frontend/trigger.out diff --git a/frontend/trigger.out b/frontend/trigger.out deleted file mode 100644 index e69de29bb..000000000