@intentius/chant 0.124.29 → 0.124.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +4 -1
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +27 -5
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +30 -0
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +49 -0
- package/dist/cli/registry.d.ts +17 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +24 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +16 -0
- package/dist/components/pr-run.d.ts +20 -2
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +26 -13
- package/dist/components/wave-plan.d.ts +11 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +26 -0
- package/dist/lifecycle/release-ledger.d.ts +8 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +2 -0
- package/dist/lifecycle/run-ledger.d.ts +1 -1
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +9 -0
- package/dist/op/activities/activity-contracts.d.ts +1 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.js +1 -0
- package/dist/op/activities/shell.d.ts +6 -0
- package/dist/op/activities/shell.d.ts.map +1 -1
- package/dist/op/activities/shell.js +1 -1
- package/dist/op/local-executor.d.ts +23 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +9 -3
- package/dist/op/runtime.d.ts +27 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +20 -0
- package/dist/pr-forge.d.ts +23 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +44 -0
- package/dist/pr-loop.d.ts +10 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +7 -0
- package/dist/run-event-stream.d.ts +2 -2
- package/dist/run-event-stream.d.ts.map +1 -1
- package/dist/run-event-stream.js +2 -2
- package/dist/run-event.d.ts +15 -0
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +2 -0
- package/dist/wave-runtime.mjs +171 -171
- package/dist/workspace/ci-green-forge.d.ts +2 -0
- package/dist/workspace/ci-green-forge.d.ts.map +1 -1
- package/dist/workspace/ci-green.d.ts +2 -0
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +4 -2
- package/dist/workspace/ci-run.d.ts +222 -0
- package/dist/workspace/ci-run.d.ts.map +1 -0
- package/dist/workspace/ci-run.js +464 -0
- package/dist/workspace/ci-serve.d.ts +214 -0
- package/dist/workspace/ci-serve.d.ts.map +1 -0
- package/dist/workspace/ci-serve.js +412 -0
- package/dist/workspace/pr-report.schema.json +5 -0
- package/dist/workspace/run-event.schema.json +14 -3
- package/dist/workspace/status-stewards.d.ts +2 -0
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status-stewards.js +1 -0
- package/dist/workspace/status.schema.json +12 -1
- package/package.json +1 -1
- package/src/cli/handlers/build.test.ts +15 -0
- package/src/cli/handlers/build.ts +4 -1
- package/src/cli/handlers/fan-out.test.ts +82 -0
- package/src/cli/handlers/fan-out.ts +34 -5
- package/src/cli/handlers/pr.ts +5 -0
- package/src/cli/main.ts +30 -0
- package/src/cli/parse-args.ts +35 -0
- package/src/cli/registry.ts +17 -1
- package/src/components/pr-pipeline.ts +32 -0
- package/src/components/pr-run.test.ts +127 -0
- package/src/components/pr-run.ts +32 -12
- package/src/components/wave-plan.ts +30 -0
- package/src/lifecycle/release-ledger.ts +9 -3
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/op/activities/activity-contracts.ts +1 -0
- package/src/op/activities/shell.ts +7 -1
- package/src/op/local-executor.ts +27 -4
- package/src/op/runtime.ts +42 -0
- package/src/pr-forge.test.ts +25 -0
- package/src/pr-forge.ts +62 -0
- package/src/pr-loop.test.ts +13 -1
- package/src/pr-loop.ts +16 -0
- package/src/run-event-stream.ts +4 -3
- package/src/run-event.ts +17 -0
- package/src/workspace/ci-green-forge.ts +2 -0
- package/src/workspace/ci-green.ts +6 -2
- package/src/workspace/ci-run.test.ts +416 -0
- package/src/workspace/ci-run.ts +571 -0
- package/src/workspace/ci-serve.test.ts +268 -0
- package/src/workspace/ci-serve.ts +521 -0
- package/src/workspace/pr-report.schema.json +5 -0
- package/src/workspace/run-event.schema.json +14 -3
- package/src/workspace/status-stewards.ts +3 -0
- package/src/workspace/status.schema.json +12 -1
|
@@ -35,6 +35,8 @@ export interface CheckRun {
|
|
|
35
35
|
* time in milliseconds, which orders a re-run after the run it replaced.
|
|
36
36
|
*/
|
|
37
37
|
opRun?: OpRunRef;
|
|
38
|
+
/** For a failed Op run, its record's `failure.code` (#4094), which a revoke note names. Absent otherwise. */
|
|
39
|
+
failureCode?: string;
|
|
38
40
|
}
|
|
39
41
|
/** The Op run a {@link CheckRun} stands for (#4044). */
|
|
40
42
|
export interface OpRunRef {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-green-forge.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-forge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAwC,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,gDAAgD;AAChD,MAAM,WAAW,QAAQ;IACvB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,6GAA6G;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C,CAAC;CAC7C;AAED,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAKD,+GAA+G;AAC/G,wBAAgB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAkCjE;AAED,0EAA0E;AAC1E,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,IAAI,EAAE,MAAM,EAKvB;CACF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAE,MAAiB,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,OAAO,CAW9I"}
|
|
@@ -80,6 +80,8 @@ export interface RunVerdict {
|
|
|
80
80
|
verdict: Verdict;
|
|
81
81
|
/** The Op run this is, when the source is chant runs (#4044). */
|
|
82
82
|
opRun?: OpRunRef;
|
|
83
|
+
/** Why the Op run failed, its record's `failure.code` (#4094), when it says. */
|
|
84
|
+
failureCode?: string;
|
|
83
85
|
}
|
|
84
86
|
export interface PhaseVerdict {
|
|
85
87
|
phase: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-green.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,EAA6C,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5F,OAAO,EAA6E,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrJ,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;A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D;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,gBAAgB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAW7G,0GAA0G;AAC1G,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,GAAG,cAAc,CAE3E;AAYD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iGAAiG;IACjG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CA4DtE;AAED,4DAA4D;AAC5D,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,MAAM,CAUnF"}
|
|
@@ -110,7 +110,7 @@ export function evaluatePhase(phase, latest) {
|
|
|
110
110
|
for (const r of matched) {
|
|
111
111
|
if (runs.some((x) => x.name === r.name))
|
|
112
112
|
continue;
|
|
113
|
-
runs.push({ name: r.name, id: r.id, status: r.status, conclusion: r.conclusion, url: r.url, verdict: runVerdict(phase, r), ...(r.opRun ? { opRun: r.opRun } : {}) });
|
|
113
|
+
runs.push({ name: r.name, id: r.id, status: r.status, conclusion: r.conclusion, url: r.url, verdict: runVerdict(phase, r), ...(r.opRun ? { opRun: r.opRun } : {}), ...(r.failureCode ? { failureCode: r.failureCode } : {}) });
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
const verdict = runs.some((r) => r.verdict === "fail")
|
|
@@ -167,7 +167,8 @@ export function greenAnnotation(green, sha, verdict, at, signer) {
|
|
|
167
167
|
/** The annotation of a revoked tag: the phase and the run that failed, and the time, signed when `signer` is given (#4031). */
|
|
168
168
|
export function revokedAnnotation(green, sha, failure, at, signer) {
|
|
169
169
|
const record = { schema: 1, tag: "revoked", commit: sha, branch: green.branch, at: iso(at), ...sourceField(green), phase: failure.phase, run: runRecord(failure.run) };
|
|
170
|
-
|
|
170
|
+
const code = failure.run.failureCode ? `, ${failure.run.failureCode}` : "";
|
|
171
|
+
return `ci: phase ${failure.phase} failed in ${failure.run.name} (${failure.run.conclusion ?? failure.run.status}${code})\n\n${recordJson(record, signer)}\n`;
|
|
171
172
|
}
|
|
172
173
|
/**
|
|
173
174
|
* Decide what a tick does, without touching git: a commit with no green tag
|
|
@@ -445,6 +446,7 @@ export function opRunCheckRun(record, signer) {
|
|
|
445
446
|
completedAt: settled ? record.ended : null,
|
|
446
447
|
url: record.runOrigin?.url ?? null,
|
|
447
448
|
opRun: { id: record.id, env: record.env, signer, statement: record.statement },
|
|
449
|
+
...(record.status === "fail" && record.failure ? { failureCode: record.failure.code } : {}),
|
|
448
450
|
};
|
|
449
451
|
}
|
|
450
452
|
/**
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant ci run plan|apply` (#4094, epic #4101): run one pull-request job as
|
|
3
|
+
* a pipeline Op, the first slice of the chant runner.
|
|
4
|
+
*
|
|
5
|
+
* The job is the typed value `prLoopJobs` (../components/pr-pipeline.ts)
|
|
6
|
+
* returns, the one the github, gitlab and forgejo generators wrap in a
|
|
7
|
+
* workflow, so the runner and a generated workflow run the same command with
|
|
8
|
+
* the same values. Nothing reads generated YAML.
|
|
9
|
+
*
|
|
10
|
+
* The job runs as an Op on the local executor (../op/local-executor.ts):
|
|
11
|
+
*
|
|
12
|
+
* - a `setup` phase with the setup lines the default image needs,
|
|
13
|
+
* - a `build` phase with the lines given to run before the command
|
|
14
|
+
* (`--before-script`, which a generated workflow runs in the same place),
|
|
15
|
+
* then the job's build and lint lines with `--pr-build` (#4088),
|
|
16
|
+
* - and a phase named for the job, `plan` or `apply`, with the job's own
|
|
17
|
+
* setup lines and its command in one shell.
|
|
18
|
+
*
|
|
19
|
+
* Each line is one shell step with a clean environment: a short list of the
|
|
20
|
+
* runner's variables (PATH, HOME and the like), the forge's connection and
|
|
21
|
+
* token variables the commands read, any `--pass-env` names, and the job's
|
|
22
|
+
* own variables. The forge values a generated job reads from `${{ ... }}`
|
|
23
|
+
* expressions or GitLab's predefined variables come from flags here:
|
|
24
|
+
* `BASE_SHA` from `--base`, `PR_NUMBER` from `--pr`, and the commit from
|
|
25
|
+
* `--commit`.
|
|
26
|
+
*
|
|
27
|
+
* The steps run in a fresh checkout of the commit: a detached `git worktree`
|
|
28
|
+
* in a temporary directory outside the repository, removed when the run
|
|
29
|
+
* ends. A worktree shares the repository's refs, so what the job records on
|
|
30
|
+
* `chant/lifecycle` (pr-apply's pending gate facts) and the remote it pushes
|
|
31
|
+
* to are the repository's own, as in a forge job's checkout. The report the
|
|
32
|
+
* job writes under `.chant/pr` is copied out of the worktree before it goes,
|
|
33
|
+
* where a forge would keep it as an artifact.
|
|
34
|
+
*
|
|
35
|
+
* The run is recorded as Op `pr-plan` or `pr-apply` in the run ledger
|
|
36
|
+
* (`<env>/runs__<op>.jsonl` on `chant/lifecycle`), and signed when a runner
|
|
37
|
+
* key is given, so `chant ci tick --source runs` (#4044) judges the commit
|
|
38
|
+
* from it. Its events are `kind: "pipeline"` and `runtime: "ci"`, and the
|
|
39
|
+
* record and the events carry `runOrigin: { forge: "chant" }`.
|
|
40
|
+
*/
|
|
41
|
+
import { type PrLoopJob, type PrLoopPipelineOptions } from "../components/pr-pipeline.js";
|
|
42
|
+
import { type ForgeKind } from "../pr-forge.js";
|
|
43
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
44
|
+
import type { RunOrigin } from "../lifecycle/release-ledger.js";
|
|
45
|
+
import { type OpRunResult, type StepRecord } from "../op/local-executor.js";
|
|
46
|
+
import type { OpRunFailureReason, OpRunRecord } from "../op/runtime.js";
|
|
47
|
+
import type { OpConfig } from "../op/types.js";
|
|
48
|
+
/** The two jobs a pull-request pipeline has. */
|
|
49
|
+
export type CiJobName = PrLoopJob["jobName"];
|
|
50
|
+
export declare const CI_JOB_NAMES: readonly CiJobName[];
|
|
51
|
+
/** The Op each job is recorded as, which `ci.green` phases match. */
|
|
52
|
+
export declare const CI_JOB_OPS: Record<CiJobName, string>;
|
|
53
|
+
/** Where a job the chant runner ran says it ran (#4094). */
|
|
54
|
+
export declare const CHANT_RUNNER_ORIGIN: RunOrigin;
|
|
55
|
+
/** The runner's variables every job gets, when the runner has them. */
|
|
56
|
+
export declare const CI_RUN_BASE_ENV: readonly ["PATH", "HOME", "USER", "LOGNAME", "SHELL", "LANG", "LC_ALL", "LC_CTYPE", "TMPDIR", "TZ"];
|
|
57
|
+
/**
|
|
58
|
+
* The forge's connection and token variables the pull-request commands read
|
|
59
|
+
* (`forgeFromEnv` in ../pr-forge.ts), which a forge job gets from the forge
|
|
60
|
+
* and a job here gets from the runner's environment.
|
|
61
|
+
*/
|
|
62
|
+
export declare const CI_RUN_FORGE_ENV: readonly ["CHANT_FORGE_TOKEN", "GITHUB_TOKEN", "GH_TOKEN", "GITHUB_REPOSITORY", "GITHUB_SERVER_URL", "GITHUB_API_URL", "GITLAB_TOKEN", "CI_API_V4_URL", "CI_PROJECT_ID", "CI_SERVER_HOST", "CI_SERVER_URL"];
|
|
63
|
+
/** The forge values a job reads, given on the command line in place of a forge's expressions. */
|
|
64
|
+
export interface CiRunValues {
|
|
65
|
+
/** `--base`: the commit the change is measured from, `BASE_SHA`. */
|
|
66
|
+
base?: string;
|
|
67
|
+
/** `--pr`: the pull request, `PR_NUMBER`. The plan needs it. */
|
|
68
|
+
pr?: number;
|
|
69
|
+
/** The full commit the job runs at. */
|
|
70
|
+
commit: string;
|
|
71
|
+
}
|
|
72
|
+
export declare class CiRunError extends Error {
|
|
73
|
+
constructor(message: string);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The job's environment: the runner's base variables, the forge variables
|
|
77
|
+
* and `passEnv` names it has, `CHANT_ENV` as a generated workflow sets it,
|
|
78
|
+
* the commit as the forge spells it, and the job's own variables. A job
|
|
79
|
+
* variable the forge fills from an expression comes from a flag, or from
|
|
80
|
+
* the runner's environment for a token such as `GITHUB_TOKEN`; a literal
|
|
81
|
+
* one, such as `CHANT_RUN_EVENTS_DIR`, is kept as it is.
|
|
82
|
+
*/
|
|
83
|
+
export declare function ciJobEnv(job: PrLoopJob, input: {
|
|
84
|
+
forge: ForgeKind;
|
|
85
|
+
env: string;
|
|
86
|
+
values: CiRunValues;
|
|
87
|
+
hostEnv: Record<string, string | undefined>;
|
|
88
|
+
passEnv?: readonly string[];
|
|
89
|
+
}): Record<string, string>;
|
|
90
|
+
/** What {@link ciJobOp} builds the Op from. */
|
|
91
|
+
export interface CiJobOpInput {
|
|
92
|
+
job: PrLoopJob;
|
|
93
|
+
env: string;
|
|
94
|
+
/** The directory the steps run in, inside the fresh checkout. */
|
|
95
|
+
cwd: string;
|
|
96
|
+
/** The job's environment, from {@link ciJobEnv}. */
|
|
97
|
+
jobEnv: Record<string, string>;
|
|
98
|
+
/** Setup lines, from `prLoopSetup`. */
|
|
99
|
+
setup: readonly string[];
|
|
100
|
+
/** Lines to run before the command, in order: `--before-script`, then the job's build and lint lines (#4088). */
|
|
101
|
+
build: readonly string[];
|
|
102
|
+
/** What runs chant, in place of `chant` at the start of the command. */
|
|
103
|
+
chant?: string;
|
|
104
|
+
}
|
|
105
|
+
/** `line` with a `chant` at its start replaced by the command the caller names, when it names one. */
|
|
106
|
+
export declare function withChant(line: string, chant?: string): string;
|
|
107
|
+
/** The job's own setup lines and its command, as one shell script, with `chant` at its start replaced by the command the caller names. */
|
|
108
|
+
export declare function ciJobCommand(job: PrLoopJob, chant?: string): string;
|
|
109
|
+
/**
|
|
110
|
+
* The job as an Op: `setup`, `build` and the job's own phase, each line one
|
|
111
|
+
* shell step in `cwd` with the job's environment and nothing else. A phase
|
|
112
|
+
* with no lines is left out.
|
|
113
|
+
*/
|
|
114
|
+
export declare function ciJobOp(input: CiJobOpInput): OpConfig;
|
|
115
|
+
/**
|
|
116
|
+
* Why a failed job failed (#4094), from its step records and, when the
|
|
117
|
+
* command wrote one, its pull-request report (`pr-plan.json` or
|
|
118
|
+
* `pr-apply.json` under `reportDir`):
|
|
119
|
+
*
|
|
120
|
+
* - a failed setup or build line: `setup-failed` or `build-failed`, the line
|
|
121
|
+
* and its exit code as the reason, and the phase;
|
|
122
|
+
* - a failed command with a report: the report's `refusal`, else its
|
|
123
|
+
* `status`, with its `message` as the reason, else the members that failed;
|
|
124
|
+
* - a failed command with no report: `command-failed` and the step's error.
|
|
125
|
+
*
|
|
126
|
+
* Undefined when no step failed, such as a run that stopped on an error of
|
|
127
|
+
* its own before any step ran.
|
|
128
|
+
*/
|
|
129
|
+
export declare function ciJobFailure(input: {
|
|
130
|
+
job: CiJobName;
|
|
131
|
+
op: OpConfig;
|
|
132
|
+
records: readonly StepRecord[];
|
|
133
|
+
reportDir: string;
|
|
134
|
+
}): OpRunFailureReason | undefined;
|
|
135
|
+
/** What `chant ci run` runs. */
|
|
136
|
+
export interface CiRunRequest {
|
|
137
|
+
/** Where the command was run: the project, or a workspace member's directory. */
|
|
138
|
+
cwd: string;
|
|
139
|
+
job: CiJobName;
|
|
140
|
+
/** `--env`: the environment the pipeline is for. */
|
|
141
|
+
env: string;
|
|
142
|
+
forge: ForgeKind;
|
|
143
|
+
/** `--base`, `--pr` and `--commit` (default `HEAD`). */
|
|
144
|
+
base?: string;
|
|
145
|
+
pr?: number;
|
|
146
|
+
commit?: string;
|
|
147
|
+
/** The generator's options: `--gate`, `--branch`, `--events-json`, `--report-url`, `--pr-build` and `--pr-build-command`. */
|
|
148
|
+
loop?: PrLoopPipelineOptions;
|
|
149
|
+
/** `--image`: the image a generated pipeline names. Only the default gets setup lines. */
|
|
150
|
+
image?: string;
|
|
151
|
+
/** `--before-script` lines, run in the build phase before the job's build lines. */
|
|
152
|
+
beforeScript?: readonly string[];
|
|
153
|
+
/** `--chant`: what runs chant in the job. Default `chant`. */
|
|
154
|
+
chant?: string;
|
|
155
|
+
/** `--pass-env`: more of the runner's variables the job gets. */
|
|
156
|
+
passEnv?: readonly string[];
|
|
157
|
+
/** The runner's environment. Default `process.env`. */
|
|
158
|
+
hostEnv?: Record<string, string | undefined>;
|
|
159
|
+
/** `--output`: where the job's report is copied, from `cwd`. Default `.chant/pr`. */
|
|
160
|
+
output?: string;
|
|
161
|
+
/** A runner key, PEM, that signs the run's record. */
|
|
162
|
+
runnerKey?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The key came from `CHANT_RUNNER_KEY`, not `--key`: one `.chant/trust.json`
|
|
165
|
+
* does not list leaves the run unsigned with a warning, as `chant run` does,
|
|
166
|
+
* where `--key` refuses the run.
|
|
167
|
+
*/
|
|
168
|
+
runnerKeyFromEnv?: boolean;
|
|
169
|
+
/** The run id. Default `chant-<epoch ms>`. */
|
|
170
|
+
runId?: string;
|
|
171
|
+
/** Where the run's events go as they happen (`--events-json`). They are kept on this host either way. */
|
|
172
|
+
runEvents?: (line: string) => void;
|
|
173
|
+
/** Where each line a step prints goes. */
|
|
174
|
+
stepOutput?: (line: string) => void;
|
|
175
|
+
/** Push `chant/lifecycle` once the record is written. Default true. */
|
|
176
|
+
push?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The apply's resume record on this host (#4095), in place of the forge's
|
|
179
|
+
* CI cache: copied into the checkout at `PR_APPLY_RECORD` before the job,
|
|
180
|
+
* when it exists, and the job's record copied back to it after, passed or
|
|
181
|
+
* failed. `chant ci serve` names one per `prApplyRecordKey`.
|
|
182
|
+
*/
|
|
183
|
+
resumeRecord?: string;
|
|
184
|
+
signal?: AbortSignal;
|
|
185
|
+
}
|
|
186
|
+
export interface CiRunResult {
|
|
187
|
+
op: string;
|
|
188
|
+
/** The executor's outcome: `ok` or `fail` for a job. */
|
|
189
|
+
status: OpRunResult["status"];
|
|
190
|
+
record: OpRunRecord;
|
|
191
|
+
/** The step that failed and why, for a failed run. */
|
|
192
|
+
failure?: {
|
|
193
|
+
phase: string;
|
|
194
|
+
error: string;
|
|
195
|
+
};
|
|
196
|
+
/** Where the job's report was copied, or null when it wrote none. */
|
|
197
|
+
report: string | null;
|
|
198
|
+
/** The runner the record was signed as, or null. */
|
|
199
|
+
signer: string | null;
|
|
200
|
+
pushed: boolean;
|
|
201
|
+
pushWarning?: string;
|
|
202
|
+
/** What went wrong beside the job, such as a record the key could not sign. */
|
|
203
|
+
warnings: string[];
|
|
204
|
+
/** The checkout the job ran in, removed by now. */
|
|
205
|
+
checkout: string;
|
|
206
|
+
}
|
|
207
|
+
/** The member a job runs for, and its directory from the repository root, as the generator decides it. */
|
|
208
|
+
export declare function ciJobPlace(cwd: string, top: string): {
|
|
209
|
+
member?: string;
|
|
210
|
+
dir: string;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Run one pull-request job as a pipeline Op in a fresh checkout of the
|
|
214
|
+
* commit, record it, and copy its report out. Throws {@link CiRunError}
|
|
215
|
+
* before anything runs when the request can't be run.
|
|
216
|
+
*/
|
|
217
|
+
export declare function ciRun(req: CiRunRequest): Promise<CiRunResult>;
|
|
218
|
+
/** The text `chant ci run` prints when the run settles. */
|
|
219
|
+
export declare function formatCiRun(r: CiRunResult): string;
|
|
220
|
+
/** `chant ci run plan|apply` (#4094). */
|
|
221
|
+
export declare function runCiRun(ctx: CommandContext): Promise<number>;
|
|
222
|
+
//# sourceMappingURL=ci-run.d.ts.map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