From 0e01090bb3e79d446c3b56937d7ed155b7a3162f Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 10 Jul 2026 05:19:29 +0200 Subject: [PATCH] fix: select gitops mirror lane from yaml --- config/platform-infra/pipelines-as-code.yaml | 1 + scripts/src/platform-infra-pipelines-as-code.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/platform-infra/pipelines-as-code.yaml b/config/platform-infra/pipelines-as-code.yaml index 94627537..488efe0d 100644 --- a/config/platform-infra/pipelines-as-code.yaml +++ b/config/platform-infra/pipelines-as-code.yaml @@ -121,6 +121,7 @@ consumers: argoNamespace: argocd argoApplication: unidesk-host closeoutGitOpsMirrorFlush: true + closeoutGitOpsMirrorLane: v03 argoBootstrap: project: default repoUrl: http://git-mirror-http.devops-infra.svc.cluster.local:8080/pikasTech/unidesk.git diff --git a/scripts/src/platform-infra-pipelines-as-code.ts b/scripts/src/platform-infra-pipelines-as-code.ts index 09f81c19..71f4063c 100644 --- a/scripts/src/platform-infra-pipelines-as-code.ts +++ b/scripts/src/platform-infra-pipelines-as-code.ts @@ -130,6 +130,7 @@ interface PacConsumer { } | null; repositoryRef: string; closeoutGitOpsMirrorFlush: boolean; + closeoutGitOpsMirrorLane: "v02" | "v03" | null; } interface CommonOptions { @@ -343,6 +344,7 @@ function parseConsumer(consumer: Record, path: string, defaultR }, repositoryRef: typeof consumer.repositoryRef === "string" && consumer.repositoryRef.length > 0 ? consumer.repositoryRef : defaultRepositoryRef, closeoutGitOpsMirrorFlush: consumer.closeoutGitOpsMirrorFlush === undefined ? false : y.booleanField(consumer, "closeoutGitOpsMirrorFlush", path), + closeoutGitOpsMirrorLane: consumer.closeoutGitOpsMirrorLane === undefined ? null : y.enumField(consumer, "closeoutGitOpsMirrorLane", path, ["v02", "v03"] as const), }; } @@ -1530,12 +1532,13 @@ async function runCloseoutGitOpsMirrorFlush(config: UniDeskConfig, pac: PacConfi }; } const deadlineMs = Date.now() + (cfg.waitTimeoutSeconds * 1000); + const gitOpsMirrorLane = consumer.closeoutGitOpsMirrorLane ?? consumer.lane; const scoped = parseNodeScopedDelegatedOptions("git-mirror", [ "flush", "--node", consumer.node, "--lane", - consumer.lane, + gitOpsMirrorLane, "--confirm", "--wait", "--timeout-seconds",