From 3edab28e37af2b69a30899509f1d90d461593964 Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Thu, 17 Apr 2025 09:31:26 -0400 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 72c6bcce3795dc491c8299b68dded029db5e066e Author: Ron Rise Date: Thu Apr 17 09:14:24 2025 -0400 My boss forced me to build this feature... Pure shit. commit 64c94d788f1f2b0926faf4326b7819e3dfa6ae85 Author: GitHub Action ๐Ÿค– Date: Thu Apr 17 12:34:35 2025 +0000 ๐Ÿ“๐Ÿ”„ Update deployment manifest with new image tags commit 681f42f59afac7ad771dc7b6102eb1358b83443a Author: Ron Rise Date: Thu Apr 17 08:19:16 2025 -0400 We're no strangers to love --- .gitea/workflows/build.yml | 32 ++++++++++++++++++++++++++++++- .gitea/workflows/deploy.yml | 33 -------------------------------- .gitea/workflows/tests.yml | 2 +- argocd/deployment/deployment.yml | 4 ++-- 4 files changed, 34 insertions(+), 37 deletions(-) delete mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 012a5d7..b2285e7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -107,4 +107,34 @@ jobs: file: ./backend/Dockerfile platforms: linux/amd64,linux/arm64 tags: scr.siteworxpro.com/reloading-manager/backend:latest - push: true \ No newline at end of file + push: true + + Deploy: + name: ๐Ÿš€โœจ Deploy Application + runs-on: ubuntu-latest + needs: [BuildFrontend, BuildBackend] + steps: + + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates + run: | + apt update && apt install -yq ca-certificates curl + curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt + update-ca-certificates + + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: ๐Ÿ“๐Ÿ”ง Update Deployment Manifest + run: | + sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml + + - name: ๐Ÿ’พโœ… Commit Updated Manifest + uses: EndBug/add-and-commit@v9 + with: + add: argocd/deployment/deployment.yml + author_name: "GitHub Action ๐Ÿค–" + author_email: gitia@siteworxpro.com + message: "๐Ÿ“๐Ÿ”„ Update deployment manifest with new image tags" + diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index 5fe4831..0000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: - workflow_run: - workflows: ["build.yml"] - types: - - completed -jobs: - Deploy: - name: ๐Ÿš€โœจ Deploy Application - runs-on: ubuntu-latest - steps: - - - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates - run: | - apt update && apt install -yq ca-certificates curl - curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt - update-ca-certificates - - - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - - name: ๐Ÿ“๐Ÿ”ง Update Deployment Manifest - run: | - sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml - - - name: ๐Ÿ’พโœ… Commit Updated Manifest - uses: EndBug/add-and-commit@v9 - with: - add: argocd/deployment/deployment.yml - author_name: "GitHub Action ๐Ÿค–" - author_email: gitia@siteworxpro.com - message: "๐Ÿ“๐Ÿ”„ Update deployment manifest with new image tags" \ No newline at end of file diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 0865ee9..014cce6 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -3,7 +3,7 @@ on: branches: - "*" -name: ๐Ÿงชโœจ Unit Tests +name: ๐Ÿงชโœจ Unit Tests Workflow jobs: build-javascript: diff --git a/argocd/deployment/deployment.yml b/argocd/deployment/deployment.yml index a80cb21..1569c29 100644 --- a/argocd/deployment/deployment.yml +++ b/argocd/deployment/deployment.yml @@ -15,10 +15,10 @@ spec: - siteworxpro containers: - name: frontend - image: scr.siteworxpro.com/reloading-manager/frontend:test + image: scr.siteworxpro.com/reloading-manager/frontend:test-build ports: - containerPort: 80 - name: backend - image: scr.siteworxpro.com/reloading-manager/backend:test + image: scr.siteworxpro.com/reloading-manager/backend:test-build ports: - containerPort: 8080