fix: delegate runtime-ready to post-flush closeout
This commit is contained in:
@@ -2541,6 +2541,10 @@ ci_timing_emit gitops-commit succeeded "$gitops_commit_started_ms"
|
||||
gitops_push_started_ms="$(ci_now_ms)"
|
||||
git_timed gitops-push 120 git push origin "HEAD:$(params.gitops-branch)"
|
||||
ci_timing_emit gitops-push succeeded "$gitops_push_started_ms"
|
||||
if [ "$runtime_lane" = "true" ]; then
|
||||
printf 'false' > /tekton/results/runtime-ready-required
|
||||
echo '{"event":"runtime-ready","phase":"gitops-promote","status":"delegated-post-flush-closeout","gitopsBranch":"'"$(params.gitops-branch)"'","sourceRevision":"'"$(params.revision)"'"}'
|
||||
fi
|
||||
argo_hard_refresh_runtime_lane
|
||||
echo '{"status":"pushed","gitopsBranch":"'"$(params.gitops-branch)"'","sourceRevision":"'"$(params.revision)"'","gitopsWriteUrl":"'"$gitops_write_url"'"}'
|
||||
`;
|
||||
|
||||
@@ -608,8 +608,13 @@ test("v03 render keeps node identity as data instead of generated structure", as
|
||||
assert.ok(generatedPaths.includes("runtime-v03/configmaps.yaml"));
|
||||
assert.ok(generatedPaths.includes("runtime-v03/external-secrets.yaml"));
|
||||
const pipeline = await readFile(path.join(outDir, "tekton-v03", "pipeline.yaml"), "utf8");
|
||||
const pipelineJson = JSON.parse(pipeline);
|
||||
assert.match(pipeline, /--external-service-report-dir \/workspace\/source\/service-results/u);
|
||||
assert.match(pipeline, /--ci-plan-path \/workspace\/source\/affected-services\.json/u);
|
||||
const gitopsPromote = taskByName(pipelineJson, "gitops-promote");
|
||||
const gitopsPromoteScript = gitopsPromote.taskSpec.steps[0].script;
|
||||
assert.match(gitopsPromoteScript, /if \[ "\$runtime_lane" = "true" \]; then\s+printf 'false' > \/tekton\/results\/runtime-ready-required/u);
|
||||
assert.match(gitopsPromoteScript, /delegated-post-flush-closeout/u);
|
||||
assert.ok(!generatedPaths.includes("runtime-v03/postgres.yaml"));
|
||||
for (const relativePath of generatedPaths) {
|
||||
assert.doesNotMatch(relativePath, /g14/i, `legacy node token leaked into generated path ${relativePath}`);
|
||||
|
||||
Reference in New Issue
Block a user