From 458229fe96200ac982b20e462dcccbf9011f48de Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Mon, 16 Nov 2026 14:27:18 +0100 Subject: [PATCH] H0: productie-deploy van SLP alleen vanaf een release/*-branch (zelfde regel als ASF) publish-sls-production en deploy-sls-production krijgen startsWith(github.ref, 'refs/heads/release/'). Docs en productie-checklist bijgewerkt. Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/continuous_integration.yaml | 10 ++++++---- docs/deploy-en-testomgevingen.md | 2 +- docs/release-checklist-productie.md | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/continuous_integration.yaml b/.gitea/workflows/continuous_integration.yaml index def921b..f894507 100644 --- a/.gitea/workflows/continuous_integration.yaml +++ b/.gitea/workflows/continuous_integration.yaml @@ -480,6 +480,7 @@ jobs: needs.frontend-test.result != 'failure' && needs.frontend-test.result != 'cancelled' && needs.frontend-lint.result != 'failure' && needs.frontend-lint.result != 'cancelled' && github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_sls_production == 'true' && + startsWith(github.ref, 'refs/heads/release/') && (needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true') runs-on: linux steps: @@ -555,12 +556,13 @@ jobs: health_check_url: ${{ vars.HEALTH_CHECK_URL_TEST }} run_db_backup: false - # Production deploy ONLY on an explicit workflow_dispatch run with deploy_sls_production checked - # (FR-04, D-09) — never reachable from a plain push to master, so pushing cannot deploy production - # under any circumstance. + # Production deploy ONLY on an explicit workflow_dispatch run with deploy_sls_production checked, and + # only when that run is on a release/* branch (same rule as ASF) — never reachable from a plain push + # to master, so pushing cannot deploy production under any circumstance, and a dispatch from master + # or a feature branch does nothing for production. deploy-sls-production: needs: [publish-sls-production, config-sls] - if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_sls_production == 'true' + if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_sls_production == 'true' && startsWith(github.ref, 'refs/heads/release/') uses: ./.gitea/workflows/deploy-scp.yaml secrets: inherit with: diff --git a/docs/deploy-en-testomgevingen.md b/docs/deploy-en-testomgevingen.md index 602f4c4..4e75b61 100644 --- a/docs/deploy-en-testomgevingen.md +++ b/docs/deploy-en-testomgevingen.md @@ -30,7 +30,7 @@ Poorten (jobs): `changes` (pad-filter), `backend-build`, `backend-test` (met een | `deploy_sls_production` | uit | Bouwt (`publish-sls-production`) en deployt naar SlpSoftware productie, met databaseback-up vooraf | | `deploy_asf_test` | uit | Bouwt (`publish-asf-test`) en deployt naar ASF test; alleen als ook `ASF_TEST_DEPLOY_ENABLED` op `true` staat | -Zonder een van de drie aangevinkt draaien alleen de poorten (handig als losse CI-run). Meerdere tegelijk aanvinken kan. Let op: `deploy_sls_production` is aan de `master`-branch niet gebonden in de workflow: de conditie van `deploy-sls-production` controleert alleen de gebeurtenis en de invoer, niet de branch (zie `ci`, job `deploy-sls-production`). +Zonder een van de drie aangevinkt draaien alleen de poorten (handig als losse CI-run). Meerdere tegelijk aanvinken kan. Let op: `deploy_sls_production` werkt alleen bij een run op een branch `release/*` (zelfde regel als ASF; de naam na `release/` is vrij, bijvoorbeeld `release/2026-11-20`). De condities van `publish-sls-production` en `deploy-sls-production` controleren de gebeurtenis (`workflow_dispatch`), de invoer en `startsWith(github.ref, 'refs/heads/release/')`; een run vanaf `master` of een featurebranch met `deploy_sls_production` aangevinkt doet voor productie niets. Een push deployt productie nooit. ## Jobnamen en branch protection (merge-checklist) diff --git a/docs/release-checklist-productie.md b/docs/release-checklist-productie.md index ef5651e..084062a 100644 --- a/docs/release-checklist-productie.md +++ b/docs/release-checklist-productie.md @@ -14,7 +14,7 @@ Achtergrond per onderwerp: [deploy-en-testomgevingen.md](deploy-en-testomgevinge 1. **CMS eerst**: PR `feature/contact-forms-module` naar `master`, na de aanpassing van de branch protection (zie 2). Een push naar `master` deployt alleen naar TEST. 2. **Daarna ASF**: de website-PR van Andrea Slop Fotografie pas na de CMS-merge, en pas nadat het testcommit **d449e76 is verwijderd** (zie 3). -3. **Productie**: pas daarna, per site, met een handmatige dispatch (`deploy_sls_production` voor SLP). Nooit als bijproduct van een merge. +3. **Productie**: pas daarna, per site, met een handmatige dispatch (`deploy_sls_production` voor SLP) **op een branch `release/*`** (bijvoorbeeld `release/2026-11-20`, gemaakt van de geteste `master`-commit; de pipeline negeert de productie-invoer op elke andere branch). Nooit als bijproduct van een merge. ## 2. Branch protection (Gitea)