diff --git a/.github/workflows/configurator-production.yml b/.github/workflows/configurator-production.yml index b7ce0b8f..430b19e9 100644 --- a/.github/workflows/configurator-production.yml +++ b/.github/workflows/configurator-production.yml @@ -131,7 +131,7 @@ jobs: deploy: needs: source - if: needs.source.result == 'success' + if: always() && !cancelled() && needs.source.result == 'success' runs-on: ubuntu-latest timeout-minutes: 100 environment: diff --git a/docs/diagrams/generated/workflow-phases.de.svg b/docs/diagrams/generated/workflow-phases.de.svg index d2309f5e..b391cd03 100644 --- a/docs/diagrams/generated/workflow-phases.de.svg +++ b/docs/diagrams/generated/workflow-phases.de.svg @@ -1,6 +1,6 @@ GitHub Actions · Pipeline-PhasenEine Zeile je Pipeline. Gemeinsame Workflows werden für Dev und Prod nicht dupliziert. -Generated by .github/scripts/workflow-map.py; source signature bf1e0f25d9b57c37fe0b9243f1b6c5581d0a79dc5f3a8de7fad504f4f5c9b34d +Generated by .github/scripts/workflow-map.py; source signature 0c9f2dfd400b1f77980048aa01d10d2c6e71b7cc70851fc52f64af96419dbe3b diff --git a/docs/diagrams/generated/workflow-phases.svg b/docs/diagrams/generated/workflow-phases.svg index 3b005124..4da92fd8 100644 --- a/docs/diagrams/generated/workflow-phases.svg +++ b/docs/diagrams/generated/workflow-phases.svg @@ -1,6 +1,6 @@ GitHub Actions · workflow phasesOne row per workflow. Shared workflows are not duplicated for Dev and Prod. -Generated by .github/scripts/workflow-map.py; source signature bf1e0f25d9b57c37fe0b9243f1b6c5581d0a79dc5f3a8de7fad504f4f5c9b34d +Generated by .github/scripts/workflow-map.py; source signature 0c9f2dfd400b1f77980048aa01d10d2c6e71b7cc70851fc52f64af96419dbe3b diff --git a/landing-zone-configurator/docs/production.de.md b/landing-zone-configurator/docs/production.de.md index 495eebed..f112842e 100644 --- a/landing-zone-configurator/docs/production.de.md +++ b/landing-zone-configurator/docs/production.de.md @@ -215,6 +215,12 @@ Die alten Modi sind nur für historische Nachweise erhalten: veröffentlichte `accepted-assistant-limitations`-Releases bleiben kompatibel lesbar; `dev-skip-assistant-qualification` bleibt Dev-only und nicht promotierbar. +Bei der Installation eines bestehenden Releases mit `publish=false` entfällt nur +die Veröffentlichung. Quellprüfung und geschützter Deploy-Job laufen weiterhin. +Prüfe, dass `deploy` einschließlich Laufzeitprüfungen tatsächlich erfolgreich +abgeschlossen wurde. Ein insgesamt grüner Workflow mit übersprungenem `deploy` +belegt keine Installation. + ## Wiederherstellung und Rotation Vorherige veröffentlichte Release-Assets und ihre geschützten Buildpack-Tags diff --git a/landing-zone-configurator/docs/production.md b/landing-zone-configurator/docs/production.md index 70512222..a5fb2883 100644 --- a/landing-zone-configurator/docs/production.md +++ b/landing-zone-configurator/docs/production.md @@ -198,6 +198,11 @@ remain only for historical provenance: published `accepted-assistant-limitations releases remain readable; `dev-skip-assistant-qualification` stays Dev-only and non-promotable. +Installing an existing release with `publish=false` skips publication only; source +verification and the protected deployment job still run. Confirm that the `deploy` +job actually completed successfully, including runtime checks. An overall green +workflow with `deploy` skipped does not prove installation. + ## Recovery and rotation Keep previous published release assets and their protected buildpack tags. diff --git a/landing-zone-configurator/infra/ci/production.test.mjs b/landing-zone-configurator/infra/ci/production.test.mjs index dd50f6dd..646edddc 100644 --- a/landing-zone-configurator/infra/ci/production.test.mjs +++ b/landing-zone-configurator/infra/ci/production.test.mjs @@ -14,6 +14,15 @@ function outputs(){ const values=Object.fromEntries(runtimeKeys.map(key=>[key,`synthetic-${key}`])); return [{cf_runtime:{value:cf},plan_runner_cf:{value:runner},database_migration:{value:{host:values.LZC_DATABASE_HOST,port:values.LZC_DATABASE_PORT,database:"configurator",username:"configurator_migration",password:"migration-only"}},assistant_test_model_serving_token:{value:"test-token-never-publish"}}, {space:{value:{id,name:"configurator"}},runner_space:{value:{id:runnerId,name:"plans",org_id:runnerId}},app_environment:{value:{...values,LZC_SERVICE_ACCOUNT_KEY:"no"}},release_credentials:{value:{username:"app-space-deployer",password:"app-space-only"}},dispatcher_credentials:{value:{credentials:{username:"runner-space-deployer",password:"runner-space-only"}}},public_endpoint:{value:{origin:"https://app.landing-zone.runs.onstackit.cloud"}}}]; } +test("redeploying an existing release runs deploy despite the skipped publication ancestor",()=>{ + const workflow=readFileSync(new URL("../../../.github/workflows/configurator-production.yml",import.meta.url),"utf8"); + const deployment=workflow.split("\n deploy:\n")[1]; + assert.ok(deployment,"Production deployment job is required"); + const condition=deployment.match(/^ if: (.+)$/m)?.[1]; + assert.match(condition??"",/always\(\)/,"A skipped publish ancestor must not add implicit success() to deploy"); + assert.match(condition,/!cancelled\(\)/,"A cancelled workflow must not deploy"); + assert.match(condition,/needs\.source\.result == 'success'/,"Only a verified published source may deploy"); +}); test("production project binding is available to every deployment phase",()=>{ const workflow=readFileSync(new URL("../../../.github/workflows/configurator-production.yml",import.meta.url),"utf8"); const deployment=workflow.split("\n deploy:\n")[1];