From dc5e8d5be49983467a81f6202c88096cf69c220d Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 12:18:16 -0500 Subject: [PATCH 01/16] Use new Uffizzi reusable workflows. --- .../workflows/call-docker-build-promote.yaml | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index e636f76..0ecb49c 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -27,7 +27,7 @@ jobs: contents: read packages: write pull-requests: write - uses: mostlydevops/actions/.github/workflows/reusable-docker-build.yaml@main + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-docker-build.yaml@main with: # DON'T login to or push to Docker Hub dockerhub-enable: false @@ -43,16 +43,31 @@ jobs: needs: docker-build-pr permissions: packages: read - uses: mostlydevops/actions/.github/workflows/reusable-trivy-scan-image.yaml@main + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-trivy-scan-image.yaml@main secrets: registry-username: ${{ github.actor }} registry-password: ${{ secrets.GITHUB_TOKEN }} with: - image: 'ghcr.io/mostlydevops/wordsmith-api:${{ needs.docker-build-pr.outputs.image-tag }}' + image: 'ghcr.io/${{ github.repository }}:${{ needs.docker-build-pr.outputs.image-tag }}' exit-code: 1 severity: HIGH,CRITICAL ignore-unfixed: true + deploy-uffizzi: + name: Deploy to Uffizzi + if: github.event_name == 'pull_request' + needs: docker-build-pr + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@uffizzi + #uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@main + secrets: + github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} + with: + repo: UffizziCloud/MostlyDevOps-k8s + environment-dir: uffizzi + image: ghcr.io/${{ github.repository }} + tag: ${{ needs.docker-build-pr.outputs.image-tag }} + pr-number: ${{ github.event.number }} + #### MERGE TO MAIN #### docker-build-merge: name: Call Build on Push @@ -61,7 +76,7 @@ jobs: contents: read packages: write pull-requests: write - uses: mostlydevops/actions/.github/workflows/reusable-docker-build.yaml@main + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-docker-build.yaml@main with: dockerhub-enable: false ghcr-enable: true @@ -79,11 +94,11 @@ jobs: name: Call GitOps PR if: github.event_name == 'push' needs: docker-build-merge - uses: mostlydevops/actions/.github/workflows/reusable-gitops-pr.yaml@main + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-gitops-pr.yaml@main secrets: github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} with: - repo: mostlydevops/wordsmith-k8s + repo: UffizziCloud/MostlyDevOps-k8s environment-dir: production image: ghcr.io/${{ github.repository }}-stable tag: ${{ needs.docker-build-merge.outputs.image-tag }} From e4019a8d8690fce3c1925097e3a569b99a1cc238 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 12:32:22 -0500 Subject: [PATCH 02/16] try `main` branch. --- .github/workflows/call-docker-build-promote.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index 0ecb49c..397d51e 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -57,8 +57,8 @@ jobs: name: Deploy to Uffizzi if: github.event_name == 'pull_request' needs: docker-build-pr - uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@uffizzi - #uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@main + #uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@uffizzi + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@main secrets: github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} with: From 58bf41dd8e6000c3ccc2feb0fcb1dc49ae60aa87 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 12:34:20 -0500 Subject: [PATCH 03/16] empty From 07635c1743696519b0e8e699334ab6698bec59c6 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 12:36:23 -0500 Subject: [PATCH 04/16] Use correct kustomize repo name. --- .github/workflows/call-docker-build-promote.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index 397d51e..bb29826 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -62,7 +62,7 @@ jobs: secrets: github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} with: - repo: UffizziCloud/MostlyDevOps-k8s + repo: UffizziCloud/MostlyDevOps-wordsmith-k8s environment-dir: uffizzi image: ghcr.io/${{ github.repository }} tag: ${{ needs.docker-build-pr.outputs.image-tag }} From 88d0dc64e8cad58482eeda3facfaaabd735d58a5 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 12:44:42 -0500 Subject: [PATCH 05/16] Pass Uffizzi Password to login. --- .github/workflows/call-docker-build-promote.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index bb29826..54dc841 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -67,6 +67,7 @@ jobs: image: ghcr.io/${{ github.repository }} tag: ${{ needs.docker-build-pr.outputs.image-tag }} pr-number: ${{ github.event.number }} + uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }} #### MERGE TO MAIN #### docker-build-merge: From e78220d9bf88be02d3d77b815f0f4571c9cbc3ba Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 12:46:48 -0500 Subject: [PATCH 06/16] pass to workflow as secret. --- .github/workflows/call-docker-build-promote.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index 54dc841..568109b 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -61,13 +61,13 @@ jobs: uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@main secrets: github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} + uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }} with: repo: UffizziCloud/MostlyDevOps-wordsmith-k8s environment-dir: uffizzi image: ghcr.io/${{ github.repository }} tag: ${{ needs.docker-build-pr.outputs.image-tag }} pr-number: ${{ github.event.number }} - uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }} #### MERGE TO MAIN #### docker-build-merge: From db83919991c0a2eb9b133994bc547ee4614213f4 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 13:03:16 -0500 Subject: [PATCH 07/16] empty From 89f06373e321849d6f692c9efc4a34b0ad4e4bb5 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 13:10:37 -0500 Subject: [PATCH 08/16] empty From dc78323ae5bd8eb2007dc2bcfe463a77e6503746 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 13:50:27 -0500 Subject: [PATCH 09/16] empty From 482d6e89dc3a21793b0938e185c21e8255c370a5 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 14:15:05 -0500 Subject: [PATCH 10/16] Add delete workflow for Uffizzi. --- .github/workflows/call-uffizzi-delete.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/call-uffizzi-delete.yaml diff --git a/.github/workflows/call-uffizzi-delete.yaml b/.github/workflows/call-uffizzi-delete.yaml new file mode 100644 index 0000000..cdc3f5e --- /dev/null +++ b/.github/workflows/call-uffizzi-delete.yaml @@ -0,0 +1,20 @@ +--- +name: Close Pull Request + +on: + pull_request: + types: [closed] + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + delete-uffizzi: + name: Delete Uffizzi virtual cluster + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi-delete.yaml@main + secrets: + github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} + uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }} + with: + pr-number: ${{ github.event.number }} From e20263230efe936df11a132412a97311db628cdd Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 14:39:30 -0500 Subject: [PATCH 11/16] empty From 5cf53c7cbec9ff6525d4be8dc218a105cca0def3 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Wed, 28 Jun 2023 16:04:47 -0500 Subject: [PATCH 12/16] empty From 8f96de5fad4c27c884a437af134855d5a0053770 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Thu, 29 Jun 2023 15:33:59 -0500 Subject: [PATCH 13/16] empty From a0ee31c78ae1e83b4ea908379d3d0d3c254ab55d Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Thu, 29 Jun 2023 15:40:29 -0500 Subject: [PATCH 14/16] empty From aa4c5c1e762b75bcbbfb5385b271dad2a41e5cb5 Mon Sep 17 00:00:00 2001 From: Adam Vollrath Date: Fri, 30 Jun 2023 13:50:06 -0500 Subject: [PATCH 15/16] Try OIDC authentication to Uffizzi. --- .github/workflows/call-docker-build-promote.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index 568109b..f2f66ab 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -57,8 +57,7 @@ jobs: name: Deploy to Uffizzi if: github.event_name == 'pull_request' needs: docker-build-pr - #uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@uffizzi - uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@main + uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@oidc secrets: github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }} uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }} From f77567331847488dcdf3b38c461b1e0e62cdfb92 Mon Sep 17 00:00:00 2001 From: Lidia Date: Wed, 5 Jul 2023 17:58:14 +0200 Subject: [PATCH 16/16] Update call-docker-build-promote.yaml --- .github/workflows/call-docker-build-promote.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-docker-build-promote.yaml b/.github/workflows/call-docker-build-promote.yaml index f2f66ab..d13d568 100644 --- a/.github/workflows/call-docker-build-promote.yaml +++ b/.github/workflows/call-docker-build-promote.yaml @@ -54,7 +54,7 @@ jobs: ignore-unfixed: true deploy-uffizzi: - name: Deploy to Uffizzi + name: Deploy to Uffizzi Test if: github.event_name == 'pull_request' needs: docker-build-pr uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@oidc