From 3d63c61c710d86ba9bc684dddb1a753a42cd041c Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Mar 2024 23:37:38 -0800 Subject: [PATCH 1/4] Move tests from .deploy to pr-open --- .github/workflows/.deploy.yml | 8 -------- .github/workflows/pr-open.yml | 9 ++++++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index c68adbce7..885045197 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -109,11 +109,3 @@ jobs: # Remove old build runs, build pods and deployment pods oc delete po --field-selector=status.phase==Succeeded - - tests: - name: Tests - needs: [deploys] - if: ${{ inputs.test == 'true' && inputs.build_outputs != '' }} - uses: ./.github/workflows/.tests.yml - with: - target: ${{ inputs.release }} diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index a9b8ade3a..3d820f00a 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -42,9 +42,16 @@ jobs: tag: ${{ github.event.number }} release: ${{ github.event.number }} + tests: + name: Tests + needs: [deploys] + uses: ./.github/workflows/.tests.yml + with: + target: ${{ github.event.number }} + results: name: PR Results - needs: [deploys] + needs: [tests] runs-on: ubuntu-22.04 steps: - run: echo "Workflow completed successfully!" From f6814c4f2bc211b98f5cbc061d81a2b368bd8d85 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Mar 2024 23:42:41 -0800 Subject: [PATCH 2/4] Use shared deployer workflow from qsoc-helpers --- .github/workflows/pr-open.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 3d820f00a..6b410c823 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -19,7 +19,7 @@ jobs: digest: ${{ steps.builds.outputs.digest }} strategy: matrix: - package: [migrations, backend, frontend] + package: [backend, frontend, migrations] timeout-minutes: 10 steps: - uses: bcgov-nr/action-builder-ghcr@v2.0.2 @@ -35,12 +35,13 @@ jobs: deploys: name: Deploys needs: [builds] - uses: ./.github/workflows/.deploy.yml - secrets: inherit + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.4.0 + secrets: + oc_namespace: ${{ vars.OC_NAMESPACE }} + oc_token: ${{ secrets.OC_TOKEN }} with: build_outputs: ${{ needs.builds.outputs.digest }} - tag: ${{ github.event.number }} - release: ${{ github.event.number }} + triggers: ('backend/', 'frontend/', 'migrations/') tests: name: Tests From 2274cc648087ba2ba46b54246435a7cc859bb1b7 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Mar 2024 23:53:30 -0800 Subject: [PATCH 3/4] Use shared deployer workflow from qsoc-helpers --- .github/workflows/pr-open.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 6b410c823..d1e1e76b7 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -40,7 +40,6 @@ jobs: oc_namespace: ${{ vars.OC_NAMESPACE }} oc_token: ${{ secrets.OC_TOKEN }} with: - build_outputs: ${{ needs.builds.outputs.digest }} triggers: ('backend/', 'frontend/', 'migrations/') tests: From a673936a49aac0c3891ceaf6fc158639d7bd6d3e Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Mar 2024 23:55:15 -0800 Subject: [PATCH 4/4] More generic charts path --- charts/{quickstart-openshift => app}/.helmignore | 0 charts/{quickstart-openshift => app}/Chart.lock | 0 charts/{quickstart-openshift => app}/Chart.yaml | 0 charts/{quickstart-openshift => app}/README.md | 0 charts/{quickstart-openshift => app}/README.md.gotmpl | 0 charts/{quickstart-openshift => app}/templates/_helpers.tpl | 0 .../templates/backend/templates/_helpers.tpl | 0 .../templates/backend/templates/deployment.yaml | 0 .../templates/backend/templates/hpa.yaml | 0 .../templates/backend/templates/pdb.yaml | 0 .../templates/backend/templates/service.yaml | 0 .../templates/frontend/templates/_helpers.tpl | 0 .../templates/frontend/templates/deployment.yaml | 0 .../templates/frontend/templates/hpa.yaml | 0 .../templates/frontend/templates/ingress.yaml | 0 .../templates/frontend/templates/pdb.yaml | 0 .../templates/frontend/templates/service.yaml | 0 charts/{quickstart-openshift => app}/templates/knp.yaml | 0 charts/{quickstart-openshift => app}/templates/secret.yaml | 0 charts/{quickstart-openshift => app}/values.yaml | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename charts/{quickstart-openshift => app}/.helmignore (100%) rename charts/{quickstart-openshift => app}/Chart.lock (100%) rename charts/{quickstart-openshift => app}/Chart.yaml (100%) rename charts/{quickstart-openshift => app}/README.md (100%) rename charts/{quickstart-openshift => app}/README.md.gotmpl (100%) rename charts/{quickstart-openshift => app}/templates/_helpers.tpl (100%) rename charts/{quickstart-openshift => app}/templates/backend/templates/_helpers.tpl (100%) rename charts/{quickstart-openshift => app}/templates/backend/templates/deployment.yaml (100%) rename charts/{quickstart-openshift => app}/templates/backend/templates/hpa.yaml (100%) rename charts/{quickstart-openshift => app}/templates/backend/templates/pdb.yaml (100%) rename charts/{quickstart-openshift => app}/templates/backend/templates/service.yaml (100%) rename charts/{quickstart-openshift => app}/templates/frontend/templates/_helpers.tpl (100%) rename charts/{quickstart-openshift => app}/templates/frontend/templates/deployment.yaml (100%) rename charts/{quickstart-openshift => app}/templates/frontend/templates/hpa.yaml (100%) rename charts/{quickstart-openshift => app}/templates/frontend/templates/ingress.yaml (100%) rename charts/{quickstart-openshift => app}/templates/frontend/templates/pdb.yaml (100%) rename charts/{quickstart-openshift => app}/templates/frontend/templates/service.yaml (100%) rename charts/{quickstart-openshift => app}/templates/knp.yaml (100%) rename charts/{quickstart-openshift => app}/templates/secret.yaml (100%) rename charts/{quickstart-openshift => app}/values.yaml (100%) diff --git a/charts/quickstart-openshift/.helmignore b/charts/app/.helmignore similarity index 100% rename from charts/quickstart-openshift/.helmignore rename to charts/app/.helmignore diff --git a/charts/quickstart-openshift/Chart.lock b/charts/app/Chart.lock similarity index 100% rename from charts/quickstart-openshift/Chart.lock rename to charts/app/Chart.lock diff --git a/charts/quickstart-openshift/Chart.yaml b/charts/app/Chart.yaml similarity index 100% rename from charts/quickstart-openshift/Chart.yaml rename to charts/app/Chart.yaml diff --git a/charts/quickstart-openshift/README.md b/charts/app/README.md similarity index 100% rename from charts/quickstart-openshift/README.md rename to charts/app/README.md diff --git a/charts/quickstart-openshift/README.md.gotmpl b/charts/app/README.md.gotmpl similarity index 100% rename from charts/quickstart-openshift/README.md.gotmpl rename to charts/app/README.md.gotmpl diff --git a/charts/quickstart-openshift/templates/_helpers.tpl b/charts/app/templates/_helpers.tpl similarity index 100% rename from charts/quickstart-openshift/templates/_helpers.tpl rename to charts/app/templates/_helpers.tpl diff --git a/charts/quickstart-openshift/templates/backend/templates/_helpers.tpl b/charts/app/templates/backend/templates/_helpers.tpl similarity index 100% rename from charts/quickstart-openshift/templates/backend/templates/_helpers.tpl rename to charts/app/templates/backend/templates/_helpers.tpl diff --git a/charts/quickstart-openshift/templates/backend/templates/deployment.yaml b/charts/app/templates/backend/templates/deployment.yaml similarity index 100% rename from charts/quickstart-openshift/templates/backend/templates/deployment.yaml rename to charts/app/templates/backend/templates/deployment.yaml diff --git a/charts/quickstart-openshift/templates/backend/templates/hpa.yaml b/charts/app/templates/backend/templates/hpa.yaml similarity index 100% rename from charts/quickstart-openshift/templates/backend/templates/hpa.yaml rename to charts/app/templates/backend/templates/hpa.yaml diff --git a/charts/quickstart-openshift/templates/backend/templates/pdb.yaml b/charts/app/templates/backend/templates/pdb.yaml similarity index 100% rename from charts/quickstart-openshift/templates/backend/templates/pdb.yaml rename to charts/app/templates/backend/templates/pdb.yaml diff --git a/charts/quickstart-openshift/templates/backend/templates/service.yaml b/charts/app/templates/backend/templates/service.yaml similarity index 100% rename from charts/quickstart-openshift/templates/backend/templates/service.yaml rename to charts/app/templates/backend/templates/service.yaml diff --git a/charts/quickstart-openshift/templates/frontend/templates/_helpers.tpl b/charts/app/templates/frontend/templates/_helpers.tpl similarity index 100% rename from charts/quickstart-openshift/templates/frontend/templates/_helpers.tpl rename to charts/app/templates/frontend/templates/_helpers.tpl diff --git a/charts/quickstart-openshift/templates/frontend/templates/deployment.yaml b/charts/app/templates/frontend/templates/deployment.yaml similarity index 100% rename from charts/quickstart-openshift/templates/frontend/templates/deployment.yaml rename to charts/app/templates/frontend/templates/deployment.yaml diff --git a/charts/quickstart-openshift/templates/frontend/templates/hpa.yaml b/charts/app/templates/frontend/templates/hpa.yaml similarity index 100% rename from charts/quickstart-openshift/templates/frontend/templates/hpa.yaml rename to charts/app/templates/frontend/templates/hpa.yaml diff --git a/charts/quickstart-openshift/templates/frontend/templates/ingress.yaml b/charts/app/templates/frontend/templates/ingress.yaml similarity index 100% rename from charts/quickstart-openshift/templates/frontend/templates/ingress.yaml rename to charts/app/templates/frontend/templates/ingress.yaml diff --git a/charts/quickstart-openshift/templates/frontend/templates/pdb.yaml b/charts/app/templates/frontend/templates/pdb.yaml similarity index 100% rename from charts/quickstart-openshift/templates/frontend/templates/pdb.yaml rename to charts/app/templates/frontend/templates/pdb.yaml diff --git a/charts/quickstart-openshift/templates/frontend/templates/service.yaml b/charts/app/templates/frontend/templates/service.yaml similarity index 100% rename from charts/quickstart-openshift/templates/frontend/templates/service.yaml rename to charts/app/templates/frontend/templates/service.yaml diff --git a/charts/quickstart-openshift/templates/knp.yaml b/charts/app/templates/knp.yaml similarity index 100% rename from charts/quickstart-openshift/templates/knp.yaml rename to charts/app/templates/knp.yaml diff --git a/charts/quickstart-openshift/templates/secret.yaml b/charts/app/templates/secret.yaml similarity index 100% rename from charts/quickstart-openshift/templates/secret.yaml rename to charts/app/templates/secret.yaml diff --git a/charts/quickstart-openshift/values.yaml b/charts/app/values.yaml similarity index 100% rename from charts/quickstart-openshift/values.yaml rename to charts/app/values.yaml