feat(cicd): add bounded pipeline evidence
This commit is contained in:
@@ -268,6 +268,26 @@ function nativeGateRows(native: Record<string, unknown> | null): unknown[][] {
|
||||
const status = runtime.ready === true ? (runtime.aligned === true ? "ready/aligned" : "ready/stale") : "not-ready";
|
||||
rows.push(["runtime", status, `${shortSha(stringOrNull(runtime.targetSha))}/${shortSha(stringOrNull(runtime.expectedSha))}`, stringOrNull(runtime.namespace) ?? "-"]);
|
||||
}
|
||||
const pipeline = asOptionalRecord(native.pipeline);
|
||||
if (pipeline !== null) {
|
||||
const runtimeReady = asOptionalRecord(asOptionalRecord(pipeline.spec)?.runtimeReadyTask);
|
||||
const when = arrayRecords(runtimeReady?.when)[0];
|
||||
rows.push([
|
||||
"pipeline",
|
||||
runtimeReady?.present === true ? "runtime-ready-present" : "runtime-ready-absent",
|
||||
when === undefined ? "-" : `${stringOrNull(when.input) ?? "-"} ${stringOrNull(when.operator) ?? "-"} ${arrayTextItems(when.values).join(",") || "-"}`,
|
||||
stringOrNull(asOptionalRecord(pipeline.metadata)?.name) ?? "-",
|
||||
]);
|
||||
}
|
||||
const refresh = asOptionalRecord(native.refreshEvidence);
|
||||
if (refresh !== null) {
|
||||
rows.push([
|
||||
"control-plane-refresh",
|
||||
stringOrNull(refresh.status) ?? "-",
|
||||
`${shortSha(stringOrNull(refresh.sourceCommit))}/${stringOrNull(refresh.pipeline) ?? "-"}`,
|
||||
stringOrNull(refresh.jobName) ?? "-",
|
||||
]);
|
||||
}
|
||||
for (const error of arrayTextItems(native.errors).slice(0, 5)) rows.push(["error", "present", error, "-"]);
|
||||
return rows;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user