fix: scope v03 secret-plane smoke to D601
This commit is contained in:
@@ -142,7 +142,9 @@ export function applyRuntimeLaneDeployConfig(args: GitOpsRenderArgs, deploy: Dep
|
||||
if (!isRuntimeLane(args.lane)) return args;
|
||||
const result: GitOpsRenderArgs = { ...args };
|
||||
const laneConfig = runtimeLaneConfig(deploy, args.lane);
|
||||
const nodeId = nodeIdForRuntimeLane(deploy, args.lane, defaults);
|
||||
const configuredNodeId = nodeIdForRuntimeLane(deploy, args.lane, defaults);
|
||||
const rootNodeId = nodeIdFromGitopsRoot(result.gitopsRoot);
|
||||
const nodeId = result.nodeId && result.nodeId !== defaultNodeId ? result.nodeId : rootNodeId ?? configuredNodeId;
|
||||
const node = nodeConfig(deploy, nodeId);
|
||||
const versionName = versionNameForRuntimeLane(args.lane);
|
||||
const defaultEndpointOptions: { host?: string; v02Endpoint?: string } = {};
|
||||
@@ -172,6 +174,13 @@ export function applyRuntimeLaneDeployConfig(args: GitOpsRenderArgs, deploy: Dep
|
||||
return result;
|
||||
}
|
||||
|
||||
function nodeIdFromGitopsRoot(gitopsRoot: unknown): string | undefined {
|
||||
if (typeof gitopsRoot !== "string") return undefined;
|
||||
const normalized = normalizeRepoPath(gitopsRoot);
|
||||
const match = normalized.match(/(?:^|\/)deploy\/gitops\/node\/([^/]+)$/u);
|
||||
return match?.[1] ? match[1].toUpperCase() : undefined;
|
||||
}
|
||||
|
||||
export function runtimeLaneMirrorSpecs(deploy: DeployConfig, defaults: RuntimeLaneDefaults = {}): RuntimeLaneMirrorSpec[] {
|
||||
return Object.entries(deploy.lanes ?? {})
|
||||
.filter(([lane, config]) => isRuntimeLane(lane) && isObject(config))
|
||||
|
||||
Reference in New Issue
Block a user