From 1d94793aa8ed02aeab4993e26d27aec941f502c8 Mon Sep 17 00:00:00 2001 From: pikastech Date: Tue, 21 Jul 2026 13:35:06 +0200 Subject: [PATCH] fix(cicd): include env changes in requested scope --- .../src/platform-infra-pipelines-as-code-bootstrap.test.ts | 2 ++ scripts/src/platform-infra-pipelines-as-code-remote.sh | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts b/scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts index 1cf7d894..21501c65 100644 --- a/scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts +++ b/scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts @@ -321,6 +321,8 @@ test("L2/L3 release exposes plan first and trigger only sends the PaC webhook", expect(planAction).toContain("imageBuildCount"); expect(planAction).toContain("envReuse"); expect(planAction).toContain("requestedScope"); + expect(planAction).toContain("service.envChangedPaths"); + expect(planAction).toContain("service.codeChangedPaths"); expect(planAction).toContain("expandedServices"); expect(planAction).toContain("buildServices"); expect(planAction).toContain("rolloutServices"); diff --git a/scripts/src/platform-infra-pipelines-as-code-remote.sh b/scripts/src/platform-infra-pipelines-as-code-remote.sh index 21023d2e..6b3ee6f6 100644 --- a/scripts/src/platform-infra-pipelines-as-code-remote.sh +++ b/scripts/src/platform-infra-pipelines-as-code-remote.sh @@ -288,7 +288,10 @@ const rolloutServices = domain?.rolloutServices || affectedServices; const buildServices = domain?.buildServices || (changedPaths.length > 0 ? configuredImages : []); const requestedServices = domain ? (domain.services || []) - .filter((service) => (service.changedPaths || []).length > 0 || service.runtimeConfigChanged === true) + .filter((service) => (service.changedPaths || []).length > 0 + || (service.envChangedPaths || []).length > 0 + || (service.codeChangedPaths || []).length > 0 + || service.runtimeConfigChanged === true) .map((service) => service.serviceId) : (changedPaths.length > 0 ? [process.env.UNIDESK_PAC_MANUAL_RUNTIME_SERVICE].filter(Boolean) : []); const expandedServices = affectedServices.filter((serviceId) => !requestedServices.includes(serviceId));