From e1c4e39f023cf13a7f3811dac26497b56e32898e Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Sat, 12 Sep 2026 17:20:43 +1000 Subject: [PATCH 1/7] Trigger Week 08 CI/CD pipeline --- user-service/app/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user-service/app/main.py b/user-service/app/main.py index 1b4769a6..f3b41265 100644 --- a/user-service/app/main.py +++ b/user-service/app/main.py @@ -138,4 +138,5 @@ def health_check() -> dict[str, str]: return { "status": "healthy", "service": "user-service", - } \ No newline at end of file + } +# Week 08 CI/CD pipeline trigger - no functional change From f3e03a7968bfa6938134c3cc8a129ac8d3dda56c Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Sat, 12 Sep 2026 17:36:49 +1000 Subject: [PATCH 2/7] Refresh production deployment workflow --- .github/workflows/04-deploy-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/04-deploy-production.yml b/.github/workflows/04-deploy-production.yml index 969d646b..c373e132 100644 --- a/.github/workflows/04-deploy-production.yml +++ b/.github/workflows/04-deploy-production.yml @@ -142,4 +142,4 @@ jobs: run: | kubectl get pods -n production kubectl get services -n production - kubectl get pvc -n production \ No newline at end of file + kubectl get pvc -n production From 087be28f12f705778adb3825313599fda637f97d Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Sat, 19 Sep 2026 11:20:16 +1000 Subject: [PATCH 3/7] Trigger CI to redeploy to rebuilt infrastructure From bc05f997e81390673d3cf733398ecf4b9e45234e Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Tue, 22 Sep 2026 18:23:16 +1000 Subject: [PATCH 4/7] 9.3C: automate production deploy via workflow_run trigger --- .github/workflows/04-deploy-production.yml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/04-deploy-production.yml b/.github/workflows/04-deploy-production.yml index c373e132..9645dace 100644 --- a/.github/workflows/04-deploy-production.yml +++ b/.github/workflows/04-deploy-production.yml @@ -1,16 +1,14 @@ name: 04 - Deploy to Production on: - workflow_dispatch: - inputs: - image_tag: - description: "Tested image SHA to deploy" - required: true - type: string + workflow_run: + workflows: ["03 - Test Staging"] + types: [completed] jobs: deploy-production: name: Deploy to Production + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest environment: @@ -19,6 +17,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_sha }} - name: Login to Azure uses: azure/login@v3 @@ -69,37 +69,37 @@ jobs: - name: Update frontend image run: | kubectl set image deployment/frontend \ - frontend=${{ vars.ACR_LOGIN_SERVER }}/koalatech-frontend:${{ inputs.image_tag }} \ + frontend=${{ vars.ACR_LOGIN_SERVER }}/koalatech-frontend:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update user-service image run: | kubectl set image deployment/user-service \ - user-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-user-service:${{ inputs.image_tag }} \ + user-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-user-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update student-service image run: | kubectl set image deployment/student-service \ - student-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-student-service:${{ inputs.image_tag }} \ + student-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-student-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update lecturer-service image run: | kubectl set image deployment/lecturer-service \ - lecturer-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-lecturer-service:${{ inputs.image_tag }} \ + lecturer-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-lecturer-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update course-service image run: | kubectl set image deployment/course-service \ - course-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-course-service:${{ inputs.image_tag }} \ + course-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-course-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update enrollment-service image run: | kubectl set image deployment/enrollment-service \ - enrollment-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-enrollment-service:${{ inputs.image_tag }} \ + enrollment-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-enrollment-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Wait for frontend rollout From 4e1844d272ba8a1ba89b64f7290d176bf9e4a637 Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Thu, 24 Sep 2026 10:07:26 +1000 Subject: [PATCH 5/7] 9.3C: update frontend for continuous deployment demo --- frontend/src/pages/Dashboard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx index c42604a5..dc6b925c 100644 --- a/frontend/src/pages/Dashboard.jsx +++ b/frontend/src/pages/Dashboard.jsx @@ -199,7 +199,7 @@ const Dashboard = () => { - Welcome to KoalaTech University + SIT722 Task 9.3C - Continuous Deployment Successful From 7e7e2b9334d3f6403a00182603759563a78cdd08 Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Thu, 24 Sep 2026 10:13:43 +1000 Subject: [PATCH 6/7] 9.3C: trigger CI pipeline from pull requests --- .github/workflows/01-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/01-ci.yml b/.github/workflows/01-ci.yml index 8206db43..42b67300 100644 --- a/.github/workflows/01-ci.yml +++ b/.github/workflows/01-ci.yml @@ -1,12 +1,14 @@ name: 01 - CI on: - # Trigger the workflow on push to main branch + pull_request: + branches: + - main + push: branches: - main - - # Manual trigger for the workflow + workflow_dispatch: @@ -114,7 +116,7 @@ jobs: - backend-test # Build and push when code is pushed to main or manually triggered - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false From 19307bfffe0f8665199f342aec8ad1f71caaf703 Mon Sep 17 00:00:00 2001 From: taruntejsaka Date: Thu, 24 Sep 2026 10:25:28 +1000 Subject: [PATCH 7/7] 9.3C: build deployment images after merge to main --- .github/workflows/01-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/01-ci.yml b/.github/workflows/01-ci.yml index 42b67300..bcc5e44c 100644 --- a/.github/workflows/01-ci.yml +++ b/.github/workflows/01-ci.yml @@ -116,7 +116,7 @@ jobs: - backend-test # Build and push when code is pushed to main or manually triggered - if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false