@intentius/sql-yodeler 0.13.5 → 0.15.1
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/ci/image-set.d.ts +75 -0
- package/dist/ci/image-set.js +124 -0
- package/dist/ci/image-set.js.map +1 -0
- package/dist/ci/login.d.ts +6 -0
- package/dist/ci/login.js +11 -0
- package/dist/ci/login.js.map +1 -1
- package/dist/ci/pipeline.d.ts +116 -0
- package/dist/ci/pipeline.js +271 -0
- package/dist/ci/pipeline.js.map +1 -0
- package/dist/ci/render.d.ts +52 -4
- package/dist/ci/render.js +245 -15
- package/dist/ci/render.js.map +1 -1
- package/dist/ci-words.d.ts +11 -1
- package/dist/ci-words.js +9 -0
- package/dist/ci-words.js.map +1 -1
- package/dist/commands/chant.js +4 -2
- package/dist/commands/chant.js.map +1 -1
- package/dist/commands/ci.js +30 -1
- package/dist/commands/ci.js.map +1 -1
- package/dist/commands/config.js +2 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/index.js +5 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/plan.js +28 -4
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/report.d.ts +2 -2
- package/dist/commands/report.js +3 -2
- package/dist/commands/report.js.map +1 -1
- package/dist/commands/stages.d.ts +9 -0
- package/dist/commands/stages.js +122 -0
- package/dist/commands/stages.js.map +1 -0
- package/dist/config/define.d.ts +223 -1
- package/dist/config/define.js +3 -0
- package/dist/config/define.js.map +1 -1
- package/dist/config/load.d.ts +6 -0
- package/dist/config/load.js +74 -7
- package/dist/config/load.js.map +1 -1
- package/dist/config/vocabulary.d.ts +28 -0
- package/dist/config/vocabulary.js +73 -0
- package/dist/config/vocabulary.js.map +1 -0
- package/dist/image-digests.json +4 -0
- package/dist/pr/note.d.ts +14 -1
- package/dist/pr/note.js +19 -3
- package/dist/pr/note.js.map +1 -1
- package/dist/project.d.ts +10 -3
- package/dist/project.js +8 -2
- package/dist/project.js.map +1 -1
- package/dist/report/chant-audit.d.ts +22 -0
- package/dist/report/chant-audit.js +30 -0
- package/dist/report/chant-audit.js.map +1 -0
- package/dist/report/jsonl.d.ts +16 -13
- package/dist/report/jsonl.js +26 -19
- package/dist/report/jsonl.js.map +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/waves/index.js +21 -4
- package/dist/waves/index.js.map +1 -1
- package/package.json +8 -8
- package/schemas/report.schema.json +27 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two CI image sets a release publishes (sql-yodeler issue 405).
|
|
3
|
+
*
|
|
4
|
+
* `debian` is `node:22-bookworm-slim` with root as its user; `chainguard` is
|
|
5
|
+
* Chainguard's `node` and `wolfi-base` images (chant's `base: "chainguard"`),
|
|
6
|
+
* which carry a newer Node and end as user 65532. Both go to
|
|
7
|
+
* ghcr.io/intentius/sql-yodeler, the Chainguard set under a tag ending
|
|
8
|
+
* `-chainguard`: `<version>` and `<version>-chainguard`.
|
|
9
|
+
*
|
|
10
|
+
* A release's package build records both digests in dist/image-digests.json
|
|
11
|
+
* (scripts/image-digests.mjs, from the cut's digests file), and
|
|
12
|
+
* yodel.config.ts `ci.imageBase` picks the set `yodel ci` names. A build with
|
|
13
|
+
* no such file (a clone, and the yodel inside the CI image, whose digest
|
|
14
|
+
* cannot be in itself) takes the digest the project's committed pipelines
|
|
15
|
+
* already carry, so `yodel ci --check` can compare the rest of the files.
|
|
16
|
+
*/
|
|
17
|
+
/** The image sets, Debian first. */
|
|
18
|
+
export type ImageSet = "debian" | "chainguard";
|
|
19
|
+
export declare const IMAGE_SETS: readonly ImageSet[];
|
|
20
|
+
export declare const IMAGE_REPOSITORY = "ghcr.io/intentius/sql-yodeler";
|
|
21
|
+
/** The tag suffix of the Chainguard set. */
|
|
22
|
+
export declare const CHAINGUARD_TAG_SUFFIX = "-chainguard";
|
|
23
|
+
/**
|
|
24
|
+
* Whether the installed chant takes `base` on `ProductImageSpec`: its
|
|
25
|
+
* `CI_IMAGE_BASE_FLOOR` is exported. An older chant renders a product image
|
|
26
|
+
* as Debian whatever `base` says, so anything that needs the Chainguard set
|
|
27
|
+
* refuses there, by {@link requireImageBase}.
|
|
28
|
+
*/
|
|
29
|
+
export declare function chantHasImageBase(): boolean;
|
|
30
|
+
/** Refuse, naming `what`, when the installed chant has no `base` for a product image. */
|
|
31
|
+
export declare function requireImageBase(what: string): void;
|
|
32
|
+
/** The tag of `set` at `v`: the version, with `-chainguard` on the Chainguard set's. */
|
|
33
|
+
export declare function imageTag(set: ImageSet, v?: string): string;
|
|
34
|
+
/** A release's digest table: each image reference (`ghcr.io/intentius/sql-yodeler:0.15.0`) to its digest. */
|
|
35
|
+
export type DigestTable = Record<string, string>;
|
|
36
|
+
/** Tests stand in a release's digest table. `reset` goes back to the one the build carries. */
|
|
37
|
+
export declare function setImageDigestsForTests(next: DigestTable | "reset"): void;
|
|
38
|
+
/** The image reference `set` has at this version, by digest when the table has it. */
|
|
39
|
+
export declare function publishedImageFor(set: ImageSet): {
|
|
40
|
+
repository: string;
|
|
41
|
+
tag: string;
|
|
42
|
+
digest?: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* What stops a pick of `set` when this build carries a release's digests but
|
|
46
|
+
* none for that set: a release that predates the Chainguard images. A build
|
|
47
|
+
* with no digests at all names no image for either set, so nothing stops it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function imageSetRefusal(set: ImageSet): string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The image `ci.imageBase` names, as `<repository>:<tag>@<digest>`, or
|
|
52
|
+
* undefined when this build's table has no digest for it. Throws the
|
|
53
|
+
* {@link imageSetRefusal} for a table that has none for the Chainguard set.
|
|
54
|
+
*/
|
|
55
|
+
export declare function imageForBase(set: ImageSet): string | undefined;
|
|
56
|
+
/** One image a release builds and publishes: its name in chant's release.images and digests file, its Dockerfile and its tag. */
|
|
57
|
+
export interface ReleaseImage {
|
|
58
|
+
name: string;
|
|
59
|
+
set: ImageSet;
|
|
60
|
+
/** From the repository root. */
|
|
61
|
+
dockerfile: string;
|
|
62
|
+
repository: string;
|
|
63
|
+
/** The tag at `v` (`{label}` in the release declaration). */
|
|
64
|
+
tag(v?: string): string;
|
|
65
|
+
}
|
|
66
|
+
/** The images a release builds: the Debian image, then the Chainguard one. */
|
|
67
|
+
export declare function releaseImages(): ReleaseImage[];
|
|
68
|
+
/**
|
|
69
|
+
* The digest of `set`'s image at this version that the project's committed
|
|
70
|
+
* pipelines already name, for a yodel that carries no release digests (a
|
|
71
|
+
* clone, or the yodel inside the CI image, which runs `yodel ci --check` in
|
|
72
|
+
* a job). It lets the check compare everything else in the files; the digest
|
|
73
|
+
* itself is the release's, and a yodel from the registry writes it.
|
|
74
|
+
*/
|
|
75
|
+
export declare function committedImage(dir: string, set: ImageSet): string | undefined;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two CI image sets a release publishes (sql-yodeler issue 405).
|
|
3
|
+
*
|
|
4
|
+
* `debian` is `node:22-bookworm-slim` with root as its user; `chainguard` is
|
|
5
|
+
* Chainguard's `node` and `wolfi-base` images (chant's `base: "chainguard"`),
|
|
6
|
+
* which carry a newer Node and end as user 65532. Both go to
|
|
7
|
+
* ghcr.io/intentius/sql-yodeler, the Chainguard set under a tag ending
|
|
8
|
+
* `-chainguard`: `<version>` and `<version>-chainguard`.
|
|
9
|
+
*
|
|
10
|
+
* A release's package build records both digests in dist/image-digests.json
|
|
11
|
+
* (scripts/image-digests.mjs, from the cut's digests file), and
|
|
12
|
+
* yodel.config.ts `ci.imageBase` picks the set `yodel ci` names. A build with
|
|
13
|
+
* no such file (a clone, and the yodel inside the CI image, whose digest
|
|
14
|
+
* cannot be in itself) takes the digest the project's committed pipelines
|
|
15
|
+
* already carry, so `yodel ci --check` can compare the rest of the files.
|
|
16
|
+
*/
|
|
17
|
+
import { readFileSync } from "node:fs";
|
|
18
|
+
import { join } from "node:path";
|
|
19
|
+
import * as ciImage from "@intentius/chant/ci-image";
|
|
20
|
+
import { version } from "../version.js";
|
|
21
|
+
export const IMAGE_SETS = ["debian", "chainguard"];
|
|
22
|
+
export const IMAGE_REPOSITORY = "ghcr.io/intentius/sql-yodeler";
|
|
23
|
+
/** The tag suffix of the Chainguard set. */
|
|
24
|
+
export const CHAINGUARD_TAG_SUFFIX = "-chainguard";
|
|
25
|
+
/**
|
|
26
|
+
* Whether the installed chant takes `base` on `ProductImageSpec`: its
|
|
27
|
+
* `CI_IMAGE_BASE_FLOOR` is exported. An older chant renders a product image
|
|
28
|
+
* as Debian whatever `base` says, so anything that needs the Chainguard set
|
|
29
|
+
* refuses there, by {@link requireImageBase}.
|
|
30
|
+
*/
|
|
31
|
+
export function chantHasImageBase() {
|
|
32
|
+
return "CI_IMAGE_BASE_FLOOR" in ciImage;
|
|
33
|
+
}
|
|
34
|
+
/** Refuse, naming `what`, when the installed chant has no `base` for a product image. */
|
|
35
|
+
export function requireImageBase(what) {
|
|
36
|
+
if (!chantHasImageBase()) {
|
|
37
|
+
throw new Error(`${what} needs a chant whose CI images take base (CI_IMAGE_BASE_FLOOR in @intentius/chant/ci-image), and the installed chant has none; move the @intentius/chant pin to a release that has it`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** The tag of `set` at `v`: the version, with `-chainguard` on the Chainguard set's. */
|
|
41
|
+
export function imageTag(set, v = version()) {
|
|
42
|
+
return set === "chainguard" ? `${v}${CHAINGUARD_TAG_SUFFIX}` : v;
|
|
43
|
+
}
|
|
44
|
+
const FILE = new URL("../image-digests.json", import.meta.url);
|
|
45
|
+
/** The table this build carries: dist/image-digests.json, which a release's build writes. Empty for any other build. */
|
|
46
|
+
function loadTable() {
|
|
47
|
+
try {
|
|
48
|
+
return JSON.parse(readFileSync(FILE, "utf8"));
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let active;
|
|
55
|
+
const table = () => (active ??= loadTable());
|
|
56
|
+
/** Tests stand in a release's digest table. `reset` goes back to the one the build carries. */
|
|
57
|
+
export function setImageDigestsForTests(next) {
|
|
58
|
+
active = next === "reset" ? undefined : next;
|
|
59
|
+
}
|
|
60
|
+
/** The image reference `set` has at this version, by digest when the table has it. */
|
|
61
|
+
export function publishedImageFor(set) {
|
|
62
|
+
const tag = imageTag(set);
|
|
63
|
+
const digest = table()[`${IMAGE_REPOSITORY}:${tag}`];
|
|
64
|
+
return { repository: IMAGE_REPOSITORY, tag, ...(digest ? { digest } : {}) };
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* What stops a pick of `set` when this build carries a release's digests but
|
|
68
|
+
* none for that set: a release that predates the Chainguard images. A build
|
|
69
|
+
* with no digests at all names no image for either set, so nothing stops it.
|
|
70
|
+
*/
|
|
71
|
+
export function imageSetRefusal(set) {
|
|
72
|
+
if (set !== "chainguard")
|
|
73
|
+
return undefined;
|
|
74
|
+
const keys = Object.keys(table());
|
|
75
|
+
if (keys.length === 0 || keys.some((k) => k.endsWith(CHAINGUARD_TAG_SUFFIX)))
|
|
76
|
+
return undefined;
|
|
77
|
+
return `yodel ${version()} publishes no Chainguard images, so its digest table has none to name; use a release that does, or name your own image in ci.image`;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The image `ci.imageBase` names, as `<repository>:<tag>@<digest>`, or
|
|
81
|
+
* undefined when this build's table has no digest for it. Throws the
|
|
82
|
+
* {@link imageSetRefusal} for a table that has none for the Chainguard set.
|
|
83
|
+
*/
|
|
84
|
+
export function imageForBase(set) {
|
|
85
|
+
const refusal = imageSetRefusal(set);
|
|
86
|
+
if (refusal)
|
|
87
|
+
throw new Error(refusal);
|
|
88
|
+
const ref = publishedImageFor(set);
|
|
89
|
+
return ref.digest ? `${ref.repository}:${ref.tag}@${ref.digest}` : undefined;
|
|
90
|
+
}
|
|
91
|
+
/** The images a release builds: the Debian image, then the Chainguard one. */
|
|
92
|
+
export function releaseImages() {
|
|
93
|
+
return IMAGE_SETS.map((set) => ({
|
|
94
|
+
name: set === "chainguard" ? `sql-yodeler${CHAINGUARD_TAG_SUFFIX}` : "sql-yodeler",
|
|
95
|
+
set,
|
|
96
|
+
dockerfile: set === "chainguard" ? ".github/image-chainguard/Dockerfile" : ".github/image/Dockerfile",
|
|
97
|
+
repository: IMAGE_REPOSITORY,
|
|
98
|
+
tag: (v) => imageTag(set, v),
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
/** Where a project's committed pipelines name their image: the pull request pipeline of each forge. */
|
|
102
|
+
const PIPELINE_FILES = [".github/workflows/yodel-pr.yml", ".forgejo/workflows/yodel-pr.yml", ".gitlab-ci.yml"];
|
|
103
|
+
/**
|
|
104
|
+
* The digest of `set`'s image at this version that the project's committed
|
|
105
|
+
* pipelines already name, for a yodel that carries no release digests (a
|
|
106
|
+
* clone, or the yodel inside the CI image, which runs `yodel ci --check` in
|
|
107
|
+
* a job). It lets the check compare everything else in the files; the digest
|
|
108
|
+
* itself is the release's, and a yodel from the registry writes it.
|
|
109
|
+
*/
|
|
110
|
+
export function committedImage(dir, set) {
|
|
111
|
+
const ref = new RegExp(`${`${IMAGE_REPOSITORY}:${imageTag(set)}`.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}@sha256:[0-9a-f]{64}`);
|
|
112
|
+
for (const file of PIPELINE_FILES) {
|
|
113
|
+
try {
|
|
114
|
+
const found = ref.exec(readFileSync(join(dir, file), "utf8"));
|
|
115
|
+
if (found)
|
|
116
|
+
return found[0];
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// not rendered for this forge
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=image-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-set.js","sourceRoot":"","sources":["../../src/ci/image-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;G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B;QAChC,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/ci/login.d.ts
CHANGED
|
@@ -97,6 +97,12 @@ export declare function jobLogins(login: CiLogin | undefined, held: ReadonlyArra
|
|
|
97
97
|
* name, and Azure logs the `az` command line in too, as before.
|
|
98
98
|
*/
|
|
99
99
|
export declare function forgejoLoginSpec(logins: readonly Login[]): CloudLoginSpec;
|
|
100
|
+
/**
|
|
101
|
+
* A Forgejo login as lines of the step that runs yodel (chant's `sameStep`):
|
|
102
|
+
* the promote job of a pipeline stage (#384) runs its command in one step,
|
|
103
|
+
* where a variable written to $GITHUB_ENV would arrive too late.
|
|
104
|
+
*/
|
|
105
|
+
export declare function forgejoLoginLines(logins: readonly Login[]): string[];
|
|
100
106
|
/** The login steps of a job on `forge`, for `logins`: chant's trade on GitHub and GitLab, the runner's token file on Forgejo. */
|
|
101
107
|
export declare function loginSteps(forge: LoginForge, logins: readonly Login[]): LoginSteps;
|
|
102
108
|
/** What is wrong with yodel.config.ts `ci.login`, if anything. */
|
package/dist/ci/login.js
CHANGED
|
@@ -124,6 +124,17 @@ function forgejoSteps(logins) {
|
|
|
124
124
|
const out = forgejoCloudLogin(forgejoLoginSpec(logins));
|
|
125
125
|
return { steps: out.steps.map((st) => ({ name: st.name, lines: st.run })), variables: {} };
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* A Forgejo login as lines of the step that runs yodel (chant's `sameStep`):
|
|
129
|
+
* the promote job of a pipeline stage (#384) runs its command in one step,
|
|
130
|
+
* where a variable written to $GITHUB_ENV would arrive too late.
|
|
131
|
+
*/
|
|
132
|
+
export function forgejoLoginLines(logins) {
|
|
133
|
+
const spec = forgejoLoginSpec(logins);
|
|
134
|
+
if (Object.keys(spec).length === 0)
|
|
135
|
+
return [];
|
|
136
|
+
return forgejoCloudLogin(spec, { sameStep: true }).steps.flatMap((st) => st.run);
|
|
137
|
+
}
|
|
127
138
|
/** The login steps of a job on `forge`, for `logins`: chant's trade on GitHub and GitLab, the runner's token file on Forgejo. */
|
|
128
139
|
export function loginSteps(forge, logins) {
|
|
129
140
|
if (logins.length === 0)
|
package/dist/ci/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/ci/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAChH,OAAO,EAAE,iBAAiB,EAAuB,MAAM,2BAA2B,CAAC;AAWnF,4EAA4E;AAC5E,MAAM,UAAU,SAAS,CAAC,MAAwB;IAChD,MAAM,IAAI,GAAc,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK;YAAE,IAAI,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;aACvH,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK;YAAE,IAAI,CAAC,GAAG,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,wBAAwB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACvJ,kFAAkF;;YAC7E,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAA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O,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The environments as stages of chant's pipeline (#384): `.chant/pipeline.ts`
|
|
3
|
+
* from yodel.config.ts, with chant's helpers.
|
|
4
|
+
*
|
|
5
|
+
* `ci.promotion` turns it on. yodel maps its config onto the stage keys of
|
|
6
|
+
* chant's vocabulary and hands them to chant's `pipelineFromConfig`, which
|
|
7
|
+
* writes the declaration; `pipelineSource` writes the file's text and
|
|
8
|
+
* `checkPipelineFile` is what `yodel ci --check` runs on it. Each stage's
|
|
9
|
+
* one wave is the environment's wave as `waves` and the sql lexicon's
|
|
10
|
+
* `sql-migrate` step have it today, so the gate, the approval mode, the
|
|
11
|
+
* tenant runs and the steps around apply stay yodel's keys.
|
|
12
|
+
*
|
|
13
|
+
* The merge applies the first stage. Its op-waves spec, which yodel commits
|
|
14
|
+
* as `yodel-waves.json` and every wave job reads at the base commit, is the
|
|
15
|
+
* first stage's spec from the folded file (`stageWavesSpec`), under the op
|
|
16
|
+
* name the ledger has held since the waves began, `yodel-apply`, so
|
|
17
|
+
* approvals keep counting. The last wave cuts a release (`yodel chant release
|
|
18
|
+
* cut`), and each later stage takes it through `yodel promote --to <env>`,
|
|
19
|
+
* whose gate chant reads from the folded file at the default branch.
|
|
20
|
+
*
|
|
21
|
+
* Everything here maps config. The gates, the risk score, the soak, the
|
|
22
|
+
* holds, the sets and the refusal of `onVerifyFail: "rollback"` on a
|
|
23
|
+
* `sql-migrate` stage are chant's.
|
|
24
|
+
*/
|
|
25
|
+
import { type CiConfig } from "../config/define.js";
|
|
26
|
+
/** The committed file chant folds. */
|
|
27
|
+
export declare const PIPELINE_TS = ".chant/pipeline.ts";
|
|
28
|
+
/** What the file's header names: the product, its config and the command that writes it again. */
|
|
29
|
+
export declare const PIPELINE_SOURCE_OPTIONS: {
|
|
30
|
+
readonly product: "yodel";
|
|
31
|
+
readonly config: "yodel.config.ts";
|
|
32
|
+
readonly command: "yodel ci";
|
|
33
|
+
};
|
|
34
|
+
/** Whether the project's environments are chant pipeline stages: `ci.promotion` is set. */
|
|
35
|
+
export declare const pipelineOn: (ci: Pick<CiConfig, "promotion"> | undefined) => boolean;
|
|
36
|
+
/** The line `chant.config.ts` carries under `ci.promotion`, so the merge's release cut waits for the merge commit's checks on the forge (#395). */
|
|
37
|
+
export declare const RELEASE_GREEN_LINE = "release: { green: \"forge-checks\" }";
|
|
38
|
+
/**
|
|
39
|
+
* What `yodel ci` tells a project under `ci.promotion` whose
|
|
40
|
+
* `chant.config.ts` names no `release.green`, or undefined. The merge's
|
|
41
|
+
* last wave of the first stage cuts the release (`release cut auto --yes
|
|
42
|
+
* --wait-checks`), and without `release.green` chant picks the gate: `chant`
|
|
43
|
+
* (a `ci/green/<sha>` tag the merge never writes) once the repository holds
|
|
44
|
+
* any `ci/green/` tag, else `forge-checks`. yodel does not write
|
|
45
|
+
* `chant.config.ts`, so it names the line. A project that sets
|
|
46
|
+
* `release.green` itself, or turns the cut off, hears nothing.
|
|
47
|
+
*/
|
|
48
|
+
export declare function releaseGreenNote(ci: Pick<CiConfig, "promotion" | "release"> | undefined, chantConfig: Record<string, unknown>): string | undefined;
|
|
49
|
+
/** The stage keys yodel reads under `ci.environments.<env>`, in camelCase. */
|
|
50
|
+
export declare const STAGE_KEYS: readonly ["hold", "freeze", "failureTolerance", "approvalRules", "risk", "soak", "canary", "onVerifyFail", "after", "queue", "urgent", "pauseAfterRollback", "publish", "reads", "config", "secrets", "imports"];
|
|
51
|
+
/**
|
|
52
|
+
* What is wrong with the pipeline keys of `ci`, as yodel reads them, or
|
|
53
|
+
* undefined. `waves` is the waves' environments in order. The values are
|
|
54
|
+
* chant's to check when `yodel ci` writes the file; here are the rules that
|
|
55
|
+
* are yodel's: the promotion order is the waves' order, a stage is one of
|
|
56
|
+
* them, a key is a stage key, and a soak check is of a kind a SQL project
|
|
57
|
+
* has a reader for.
|
|
58
|
+
*/
|
|
59
|
+
export declare function pipelineConfigProblem(ci: Record<string, unknown>, waves: readonly string[] | undefined, where: string): string | undefined;
|
|
60
|
+
/** A wave of a stage, as `waves` and the sql lexicon's step have it: the forge-free part of yodel's waves spec. */
|
|
61
|
+
export interface StageWave {
|
|
62
|
+
name: string;
|
|
63
|
+
runs: Array<{
|
|
64
|
+
target: string;
|
|
65
|
+
op: string;
|
|
66
|
+
}>;
|
|
67
|
+
gate: string;
|
|
68
|
+
shares?: number;
|
|
69
|
+
approval?: string;
|
|
70
|
+
hooks?: unknown;
|
|
71
|
+
}
|
|
72
|
+
/** What {@link pipelineDeclaration} reads. */
|
|
73
|
+
export interface PipelineInput {
|
|
74
|
+
/** The pipeline's name, the op its stage gates are recorded under. */
|
|
75
|
+
name: string;
|
|
76
|
+
ci: CiConfig;
|
|
77
|
+
/** The waves spec under yodel's words, without a forge's job settings: its waves become the stages' waves, the rest the pipeline's `defaults`. */
|
|
78
|
+
spec: {
|
|
79
|
+
name: string;
|
|
80
|
+
waves: StageWave[];
|
|
81
|
+
} & Record<string, unknown>;
|
|
82
|
+
/** The command the release cut runs as, in place of `chant`. */
|
|
83
|
+
bin: string[];
|
|
84
|
+
}
|
|
85
|
+
/** A stage's `holds.risk`: its own `risk`, else `ci.risk.approveAbove` for every stage. */
|
|
86
|
+
export declare function stageRisk(ci: CiConfig, env: string): {
|
|
87
|
+
approveAbove?: number;
|
|
88
|
+
quorum?: Array<Record<string, unknown>>;
|
|
89
|
+
} | undefined;
|
|
90
|
+
/** A stage's `risk` as chant's `pipelineFromConfig` reads it: its own keys, with `ci.risk.approveAbove` where the stage sets no threshold. */
|
|
91
|
+
export declare function stageRiskConfig(ci: CiConfig, env: string): {
|
|
92
|
+
approveAbove?: number;
|
|
93
|
+
approvalRules?: Array<Record<string, unknown>>;
|
|
94
|
+
} | undefined;
|
|
95
|
+
/** The pipeline's declaration from yodel.config.ts, through chant's `pipelineFromConfig`. Throws what chant refuses. */
|
|
96
|
+
export declare function pipelineDeclaration(input: PipelineInput): Promise<import("@intentius/chant/pipeline").PipelineDeclaration>;
|
|
97
|
+
/** The text of `.chant/pipeline.ts` for `declaration`, chant's `pipelineSource`. */
|
|
98
|
+
export declare function pipelineText(declaration: import("@intentius/chant/pipeline").PipelineDeclaration): Promise<string>;
|
|
99
|
+
/**
|
|
100
|
+
* The first stage's op-waves spec from the folded text: what the merge
|
|
101
|
+
* applies. It keeps the op name the ledger holds the waves under, `name`.
|
|
102
|
+
* Throws when the text does not fold.
|
|
103
|
+
*/
|
|
104
|
+
export declare function firstStageSpec(text: string, name: string): Promise<Record<string, unknown> & {
|
|
105
|
+
name: string;
|
|
106
|
+
waves: StageWave[];
|
|
107
|
+
}>;
|
|
108
|
+
/** The stages after the first: the ones the promote jobs reach. */
|
|
109
|
+
export declare const laterStages: (ci: CiConfig) => string[];
|
|
110
|
+
/**
|
|
111
|
+
* chant's environment sets from `ci.environments.<env>` and `ci.configSets`,
|
|
112
|
+
* or undefined when no stage names a set. Every wave environment gets a
|
|
113
|
+
* set, an empty one when it names none, since chant refuses an environment
|
|
114
|
+
* the sets leave out.
|
|
115
|
+
*/
|
|
116
|
+
export declare function environmentSetsOf(ci: CiConfig | undefined, envs: readonly string[]): import("@intentius/chant/components").EnvironmentSets | undefined;
|