Merge pull request 'CI: productie-deploy van de SLP-website alleen vanaf een release/*-branch' (#16) from feature/hero-h0-release-branch-only into master
Continuous Integration / config-asf (push) Successful in 20s
Continuous Integration / config-sls (push) Successful in 22s
Continuous Integration / changes (push) Successful in 30s
Continuous Integration / vulnerability-scan (push) Successful in 1m55s
Continuous Integration / frontend-prepare (push) Successful in 1m58s
Continuous Integration / backend-build (push) Successful in 2m13s
Continuous Integration / compile-sites (push) Successful in 2m15s
Continuous Integration / frontend-build (push) Successful in 2m6s
Continuous Integration / frontend-lint (push) Successful in 2m0s
Continuous Integration / frontend-test (push) Successful in 2m30s
Continuous Integration / backend-test (push) Successful in 12m10s
Continuous Integration / publish-sls-production (push) Skipped
Continuous Integration / deploy-sls-production (push) Skipped
Continuous Integration / publish-sls-test (push) Successful in 1m32s
Continuous Integration / publish-asf-test (push) Successful in 1m38s
Continuous Integration / deploy-sls-test (push) Successful in 39s
Continuous Integration / deploy-asf-test (push) Successful in 33s
Continuous Integration / smoke-sls-test (push) Successful in 10s
Continuous Integration / smoke-asf-test (push) Successful in 11s
Deploy (SCP) / deploy (push) Successful in 33s
Continuous Integration / config-asf (push) Successful in 20s
Continuous Integration / config-sls (push) Successful in 22s
Continuous Integration / changes (push) Successful in 30s
Continuous Integration / vulnerability-scan (push) Successful in 1m55s
Continuous Integration / frontend-prepare (push) Successful in 1m58s
Continuous Integration / backend-build (push) Successful in 2m13s
Continuous Integration / compile-sites (push) Successful in 2m15s
Continuous Integration / frontend-build (push) Successful in 2m6s
Continuous Integration / frontend-lint (push) Successful in 2m0s
Continuous Integration / frontend-test (push) Successful in 2m30s
Continuous Integration / backend-test (push) Successful in 12m10s
Continuous Integration / publish-sls-production (push) Skipped
Continuous Integration / deploy-sls-production (push) Skipped
Continuous Integration / publish-sls-test (push) Successful in 1m32s
Continuous Integration / publish-asf-test (push) Successful in 1m38s
Continuous Integration / deploy-sls-test (push) Successful in 39s
Continuous Integration / deploy-asf-test (push) Successful in 33s
Continuous Integration / smoke-sls-test (push) Successful in 10s
Continuous Integration / smoke-asf-test (push) Successful in 11s
Deploy (SCP) / deploy (push) Successful in 33s
This commit was merged in pull request #16.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user