fix: 同步 NC01 PaC source artifact

This commit is contained in:
root
2026-07-11 08:29:35 +02:00
parent e76e4d2bcb
commit d2790974f3
4 changed files with 2304 additions and 21 deletions
+4 -4
View File
@@ -104,7 +104,7 @@ test("tracked PaC remote pipelines pass selected services to catalog restore", a
];
for (const target of targets) {
const pipeline = JSON.parse(await readFile(target.pipelinePath, "utf8"));
const pipeline = await readStructuredFile(process.cwd(), target.pipelinePath);
assert.equal(pipeline.metadata?.name, target.pipelineName, `${target.node} tracked Pipeline name`);
const planArtifacts = pipeline.spec?.tasks?.find((task) => task.name === "plan-artifacts");
assert.ok(planArtifacts, `${target.node} tracked Pipeline plan-artifacts task`);
@@ -115,9 +115,9 @@ test("tracked PaC remote pipelines pass selected services to catalog restore", a
assert.match(script, /rolloutWithoutImageBuildServices/u);
assert.match(script, /artifactCatalog: plan\.artifactCatalog/u);
const pac = await readFile(target.pacPath, "utf8");
assert.ok(pac.includes(`pipelinesascode.tekton.dev/pipeline: "${target.pipelinePath}"`), `${target.node} PaC remote Pipeline path`);
assert.ok(pac.includes(`pipelineRef:\n name: ${target.pipelineName}`), `${target.node} PaC PipelineRef`);
const pac = await readStructuredFile(process.cwd(), target.pacPath);
assert.equal(pac.metadata?.annotations?.["pipelinesascode.tekton.dev/pipeline"], target.pipelinePath, `${target.node} PaC remote Pipeline path`);
assert.equal(pac.spec?.pipelineRef?.name, target.pipelineName, `${target.node} PaC PipelineRef`);
}
});