fix: trim v02 cicd fast path checks
This commit is contained in:
@@ -50,6 +50,7 @@ test("v02 render follows TypeScript runtime checks and does not self-patch boots
|
||||
|
||||
const runtimeReady = taskByName(pipelineJson, "runtime-ready");
|
||||
const runtimeReadyScript = runtimeReady.taskSpec.steps[0].script;
|
||||
assert.match(runtimeReadyScript, /const pollMs = 1000;/u);
|
||||
assert.match(runtimeReadyScript, /status: "timeout", reason: "source-commit-refresh-timeout"/u);
|
||||
assert.match(runtimeReadyScript, /const refresh = await waitForArgoRefresh\(\);\n if \(!refresh\.observed\) return;/u);
|
||||
|
||||
@@ -61,24 +62,34 @@ test("v02 render follows TypeScript runtime checks and does not self-patch boots
|
||||
assert.match(gitopsPromoteScript, /BatchMode=yes/u);
|
||||
assert.match(gitopsPromoteScript, /ConnectTimeout=10/u);
|
||||
assert.match(gitopsPromoteScript, /git_timed "source-head-\$phase" 45 git ls-remote/u);
|
||||
assert.match(gitopsPromoteScript, /"event":"git-ssh-setup","phase":"gitops-promote","status":"skipped"/u);
|
||||
assert.match(gitopsPromoteScript, /source_head_url="\$\(params\.git-read-url\)"/u);
|
||||
assert.match(gitopsPromoteScript, /gitops_write_url="\$\(params\.git-write-url\)"/u);
|
||||
assert.match(gitopsPromoteScript, /git clone --no-checkout "\$gitops_read_url"/u);
|
||||
assert.match(gitopsPromoteScript, /git_timed gitops-push 120 git push origin/u);
|
||||
assert.doesNotMatch(gitopsPromoteScript, /gitops-promote-proxy-preflight/u);
|
||||
assert.doesNotMatch(gitopsPromoteScript, /for tool in node npm git ssh curl timeout/u);
|
||||
|
||||
const prepareSource = taskByName(pipelineJson, "prepare-source");
|
||||
assert.ok(prepareSource.taskSpec.params.some((param) => param.name === "git-read-url"));
|
||||
assert.ok(prepareSource.params.some((param) => param.name === "git-read-url" && param.value === "$(params.git-read-url)"));
|
||||
const prepareSourceScript = prepareSource.taskSpec.steps[0].script;
|
||||
assert.match(prepareSourceScript, /git_read_url="\$\(params\.git-read-url\)"/u);
|
||||
assert.match(prepareSourceScript, /"event":"git-ssh-setup","phase":"prepare-source","status":"skipped"/u);
|
||||
assert.match(prepareSourceScript, /git_timed source-clone 180 git clone --branch "\$\(params\.source-branch\)" "\$git_read_url"/u);
|
||||
assert.match(prepareSourceScript, /git_timed catalog-ls-remote 45 git ls-remote --exit-code --heads "\$git_read_url"/u);
|
||||
assert.match(prepareSourceScript, /git remote set-url gitops-catalog "\$git_read_url"/u);
|
||||
assert.match(prepareSourceScript, /prepare-source-dependencies/u);
|
||||
assert.doesNotMatch(prepareSourceScript, /npm ci --ignore-scripts/u);
|
||||
assert.doesNotMatch(prepareSourceScript, /prepare-source-pre-npm/u);
|
||||
assert.doesNotMatch(prepareSourceScript, /prepare-source-proxy-preflight/u);
|
||||
assert.doesNotMatch(prepareSourceScript, /dependency-curl-probe-start/u);
|
||||
|
||||
const planArtifacts = taskByName(pipelineJson, "plan-artifacts");
|
||||
assert.doesNotMatch(planArtifacts.taskSpec.steps[0].script, /plan-artifacts-proxy-preflight/u);
|
||||
const collectArtifacts = taskByName(pipelineJson, "collect-artifacts");
|
||||
assert.doesNotMatch(collectArtifacts.taskSpec.steps[0].script, /collect-artifacts-proxy-preflight/u);
|
||||
|
||||
const pipelineGitReadParam = pipelineJson.spec.params.find((param) => param.name === "git-read-url");
|
||||
assert.equal(pipelineGitReadParam?.default, "http://git-mirror-http.devops-infra.svc.cluster.local/pikasTech/HWLAB.git");
|
||||
const pipelineGitWriteParam = pipelineJson.spec.params.find((param) => param.name === "git-write-url");
|
||||
@@ -160,7 +171,6 @@ test("v02 render follows TypeScript runtime checks and does not self-patch boots
|
||||
assert.deepEqual(task.when, [{ input: `$(tasks.plan-artifacts.results.affected-${serviceId})`, operator: "in", values: ["true"] }]);
|
||||
}
|
||||
|
||||
const collectArtifacts = taskByName(pipelineJson, "collect-artifacts");
|
||||
const collectScript = collectArtifacts.taskSpec.steps[0].script;
|
||||
assert.match(collectScript, /--external-service-report-dir \/workspace\/source\/service-results/u);
|
||||
assert.doesNotMatch(JSON.stringify(collectArtifacts), /tasks\.build-hwlab-device-pod\.results/u);
|
||||
|
||||
Reference in New Issue
Block a user