@intentius/chant 0.124.87 → 0.124.88
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/action-pins.d.ts +1 -0
- package/dist/action-pins.d.ts.map +1 -1
- package/dist/action-pins.js +2 -0
- package/dist/actor.d.ts +12 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +18 -0
- package/dist/bundle-check.d.ts +20 -5
- package/dist/bundle-check.d.ts.map +1 -1
- package/dist/bundle-check.js +20 -5
- package/dist/chant-install.d.ts +98 -0
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +204 -2
- package/dist/ci-commit.d.ts +1 -1
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +1 -2
- package/dist/ci-control.d.ts +1 -1
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +1 -1
- package/dist/ci-evidence-claims.d.ts +59 -0
- package/dist/ci-evidence-claims.d.ts.map +1 -0
- package/dist/ci-evidence-claims.js +87 -0
- package/dist/ci-evidence-from-job.d.ts +103 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -0
- package/dist/ci-evidence-from-job.js +162 -0
- package/dist/ci-evidence-jobs.d.ts +39 -4
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +38 -4
- package/dist/ci-handover.d.ts +12 -0
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +15 -3
- package/dist/ci-identity.d.ts +32 -6
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +40 -8
- package/dist/ci-image.d.ts +47 -9
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +45 -18
- package/dist/ci-jobs.d.ts +1 -1
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -2
- package/dist/ci-login.d.ts +75 -13
- package/dist/ci-login.d.ts.map +1 -1
- package/dist/ci-login.js +89 -37
- package/dist/ci-product-words.d.ts +20 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +27 -1
- package/dist/ci-product.d.ts +21 -2
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +21 -2
- package/dist/cli/handlers/approve-confirm.d.ts +14 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -1
- package/dist/cli/handlers/approve-confirm.js +46 -0
- package/dist/cli/handlers/build.d.ts +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +22 -1
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +21 -1
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +227 -18
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-forge-check.js +34 -17
- package/dist/cli/handlers/generated-check.d.ts +3 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -0
- package/dist/cli/handlers/generated-check.js +41 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +3 -0
- package/dist/cli/handlers/local-chant.d.ts +13 -0
- package/dist/cli/handlers/local-chant.d.ts.map +1 -1
- package/dist/cli/handlers/local-chant.js +42 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +42 -5
- package/dist/cli/handlers/run-wave.js +8 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +38 -4
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +66 -0
- package/dist/cli/registry.d.ts +24 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/check-hooks.d.ts +10 -0
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-hooks.js +18 -0
- package/dist/components/pr-checks.d.ts +105 -0
- package/dist/components/pr-checks.d.ts.map +1 -0
- package/dist/components/pr-checks.js +119 -0
- package/dist/components/pr-pipeline.d.ts +34 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +14 -1
- package/dist/components/product-pipeline.d.ts +16 -1
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +17 -2
- package/dist/components/product-plan.d.ts +257 -4
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +241 -11
- package/dist/config.d.ts +10 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -6
- package/dist/control/consumers.d.ts +6 -0
- package/dist/control/consumers.d.ts.map +1 -1
- package/dist/control/consumers.js +6 -0
- package/dist/dead-guards.d.ts.map +1 -1
- package/dist/dead-guards.js +9 -6
- package/dist/discovery/files.d.ts +1 -1
- package/dist/discovery/files.js +1 -1
- package/dist/drift-issue.d.ts +20 -3
- package/dist/drift-issue.d.ts.map +1 -1
- package/dist/drift-issue.js +16 -0
- package/dist/drift-record.d.ts +45 -5
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +27 -6
- package/dist/floor-table.d.ts +6 -6
- package/dist/floor-table.d.ts.map +1 -1
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +58 -21
- package/dist/floor-table.js +10 -7
- package/dist/forge-check/contract.d.ts +8 -0
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +4 -1
- package/dist/forge-check/index.d.ts +2 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +2 -0
- package/dist/forge-flags.d.ts +10 -0
- package/dist/forge-flags.d.ts.map +1 -1
- package/dist/forge-flags.js +31 -0
- package/dist/forge-remote.d.ts +47 -0
- package/dist/forge-remote.d.ts.map +1 -0
- package/dist/forge-remote.js +69 -0
- package/dist/generated-check.d.ts +74 -0
- package/dist/generated-check.d.ts.map +1 -0
- package/dist/generated-check.js +216 -0
- package/dist/lexicon.d.ts +16 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.d.ts +15 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +49 -3
- package/dist/lifecycle/release-images.d.ts +22 -1
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +27 -3
- package/dist/lifecycle/release-ledger.d.ts +4 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +3 -2
- package/dist/local-chant.d.ts +57 -3
- package/dist/local-chant.d.ts.map +1 -1
- package/dist/local-chant.js +122 -13
- package/dist/op/op-waves-evidence-jobs.d.ts +92 -0
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
- package/dist/op/op-waves-evidence-jobs.js +112 -0
- package/dist/op/op-waves-evidence.d.ts +12 -1
- package/dist/op/op-waves-evidence.d.ts.map +1 -1
- package/dist/op/op-waves-evidence.js +23 -2
- package/dist/op/op-waves-run.d.ts +12 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +54 -3
- package/dist/op/op-waves.d.ts +8 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +10 -0
- package/dist/op/schedule-overdue.d.ts +39 -2
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +89 -7
- package/dist/pr-forge-reads.d.ts +21 -1
- package/dist/pr-forge-reads.d.ts.map +1 -1
- package/dist/pr-forge-reads.js +19 -1
- package/dist/pr-forge.d.ts +7 -1
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +7 -2
- package/dist/pr-plan-note.d.ts +24 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +11 -1
- package/dist/pr-plan-record.d.ts +47 -0
- package/dist/pr-plan-record.d.ts.map +1 -0
- package/dist/pr-plan-record.js +89 -0
- package/dist/pr-post.d.ts +40 -0
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +79 -6
- package/dist/pr-requires.d.ts +8 -0
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +3 -1
- package/dist/ref-gate-init.d.ts +76 -0
- package/dist/ref-gate-init.d.ts.map +1 -0
- package/dist/ref-gate-init.js +144 -0
- package/dist/ref-gate-rules.d.ts +19 -0
- package/dist/ref-gate-rules.d.ts.map +1 -0
- package/dist/ref-gate-rules.js +17 -0
- package/dist/release-floors.d.ts +64 -16
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +65 -17
- package/dist/state-migration.d.ts +24 -1
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +39 -3
- package/dist/state-unlock.d.ts +32 -1
- package/dist/state-unlock.d.ts.map +1 -1
- package/dist/state-unlock.js +31 -0
- package/dist/wave-runtime.mjs +292 -285
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +13 -7
- package/dist/workspace/drift-cli.d.ts +1 -1
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +5 -12
- package/dist/workspace/forge-work.d.ts +3 -2
- package/dist/workspace/forge-work.d.ts.map +1 -1
- package/dist/workspace/forge-work.js +7 -17
- package/dist/workspace/lexicon-outputs.js +2 -2
- package/dist/workspace/release-workflow.d.ts +26 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +48 -6
- package/dist/workspace/trust/check-evidence-report.d.ts +18 -0
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +13 -0
- package/dist/workspace/trust/check-evidence.d.ts +13 -1
- package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence.js +8 -3
- package/dist/workspace/trust/evidence.d.ts +5 -0
- package/dist/workspace/trust/evidence.d.ts.map +1 -1
- package/dist/workspace/trust/evidence.js +5 -0
- package/dist/workspace/trust/open-evidence.d.ts +67 -0
- package/dist/workspace/trust/open-evidence.d.ts.map +1 -0
- package/dist/workspace/trust/open-evidence.js +92 -0
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +65 -3
- package/dist/workspace/trust/ref-gate.d.ts +61 -2
- package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate.js +72 -7
- package/package.json +1 -1
- package/src/action-pins.ts +2 -0
- package/src/actor.test.ts +12 -0
- package/src/actor.ts +19 -0
- package/src/bundle-check.test.ts +22 -0
- package/src/bundle-check.ts +33 -5
- package/src/chant-install.test.ts +109 -1
- package/src/chant-install.ts +243 -2
- package/src/ci-commit.test.ts +51 -5
- package/src/ci-commit.ts +1 -2
- package/src/ci-control.ts +1 -0
- package/src/ci-evidence-claims.ts +102 -0
- package/src/ci-evidence-from-job.test.ts +147 -0
- package/src/ci-evidence-from-job.ts +195 -0
- package/src/ci-evidence-jobs.ts +41 -4
- package/src/ci-handover.ts +16 -3
- package/src/ci-identity.test.ts +3 -3
- package/src/ci-identity.ts +51 -11
- package/src/ci-image.test.ts +60 -10
- package/src/ci-image.ts +78 -19
- package/src/ci-jobs.ts +7 -2
- package/src/ci-login.test.ts +131 -3
- package/src/ci-login.token-drop.test.ts +204 -0
- package/src/ci-login.ts +137 -39
- package/src/ci-product-words.ts +30 -0
- package/src/ci-product.ts +26 -1
- package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
- package/src/cli/handlers/approve-confirm.test.ts +35 -0
- package/src/cli/handlers/approve-confirm.ts +44 -0
- package/src/cli/handlers/build-source-dir.test.ts +4 -0
- package/src/cli/handlers/build.ts +20 -2
- package/src/cli/handlers/ci-check.ts +19 -1
- package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
- package/src/cli/handlers/ci-evidence.ts +210 -16
- package/src/cli/handlers/ci-forge-check.ts +22 -9
- package/src/cli/handlers/generated-check.ts +39 -0
- package/src/cli/handlers/lifecycle.test.ts +20 -0
- package/src/cli/handlers/lifecycle.ts +4 -0
- package/src/cli/handlers/local-chant.ts +39 -1
- package/src/cli/handlers/pr.ts +43 -5
- package/src/cli/handlers/run-wave.ts +7 -0
- package/src/cli/main.ts +38 -4
- package/src/cli/parse-args.ts +46 -0
- package/src/cli/registry.ts +24 -0
- package/src/components/check-hooks.ts +22 -0
- package/src/components/check-report-summary.test.ts +78 -0
- package/src/components/pr-checks.ts +159 -0
- package/src/components/pr-pipeline.ts +41 -1
- package/src/components/product-pipeline.ts +25 -3
- package/src/components/product-plan.test.ts +102 -1
- package/src/components/product-plan.ts +416 -15
- package/src/config.ts +13 -8
- package/src/control/consumers.ts +7 -0
- package/src/dead-guards.test.ts +27 -5
- package/src/dead-guards.ts +9 -6
- package/src/discovery/files.ts +1 -1
- package/src/drift-issue.test.ts +29 -1
- package/src/drift-issue.ts +28 -3
- package/src/drift-record.test.ts +25 -0
- package/src/drift-record.ts +55 -6
- package/src/floor-table.data.ts +58 -21
- package/src/floor-table.ts +12 -9
- package/src/forge-check/contract.ts +11 -1
- package/src/forge-check/forge-check.test.ts +8 -0
- package/src/forge-check/index.ts +2 -0
- package/src/forge-flags.test.ts +25 -1
- package/src/forge-flags.ts +34 -0
- package/src/forge-remote.test.ts +37 -0
- package/src/forge-remote.ts +79 -0
- package/src/generated-check.e2e.test.ts +98 -0
- package/src/generated-check.test.ts +104 -0
- package/src/generated-check.ts +269 -0
- package/src/lexicon.ts +17 -0
- package/src/lifecycle/publish-npm.ts +56 -3
- package/src/lifecycle/release-catalog.test.ts +2 -2
- package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
- package/src/lifecycle/release-images.test.ts +44 -0
- package/src/lifecycle/release-images.ts +39 -3
- package/src/lifecycle/release-ledger.ts +4 -3
- package/src/local-chant.e2e.test.ts +81 -6
- package/src/local-chant.test.ts +22 -3
- package/src/local-chant.ts +130 -13
- package/src/op/op-waves-evidence-jobs.ts +134 -0
- package/src/op/op-waves-evidence.test.ts +36 -3
- package/src/op/op-waves-evidence.ts +23 -3
- package/src/op/op-waves-run.ts +57 -2
- package/src/op/op-waves.ts +11 -0
- package/src/op/schedule-overdue.test.ts +83 -1
- package/src/op/schedule-overdue.ts +107 -9
- package/src/pr-forge-reads-compare.test.ts +2 -1
- package/src/pr-forge-reads.ts +37 -1
- package/src/pr-forge.ts +14 -3
- package/src/pr-plan-note.ts +32 -3
- package/src/pr-plan-record.test.ts +75 -0
- package/src/pr-plan-record.ts +101 -0
- package/src/pr-post-plan-note.test.ts +60 -0
- package/src/pr-post.test.ts +30 -0
- package/src/pr-post.ts +110 -6
- package/src/pr-requires.test.ts +20 -0
- package/src/pr-requires.ts +10 -1
- package/src/ref-gate-init.ts +189 -0
- package/src/ref-gate-rules.ts +26 -0
- package/src/release-floors.ts +86 -17
- package/src/state-migration-record.test.ts +90 -0
- package/src/state-migration.test.ts +1 -1
- package/src/state-migration.ts +52 -3
- package/src/state-unlock.test.ts +33 -1
- package/src/state-unlock.ts +49 -1
- package/src/workspace/ci-green-cli.ts +12 -6
- package/src/workspace/drift-cli.ts +6 -18
- package/src/workspace/forge-work.ts +7 -14
- package/src/workspace/lexicon-outputs.ts +2 -2
- package/src/workspace/release-workflow.test.ts +70 -0
- package/src/workspace/release-workflow.ts +56 -8
- package/src/workspace/trust/check-evidence-report.ts +24 -0
- package/src/workspace/trust/check-evidence.ts +17 -5
- package/src/workspace/trust/evidence.ts +5 -0
- package/src/workspace/trust/open-evidence.ts +129 -0
- package/src/workspace/trust/ref-gate-cli.ts +59 -3
- package/src/workspace/trust/ref-gate-pieces.test.ts +175 -0
- package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
- package/src/workspace/trust/ref-gate.ts +87 -6
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `chant ci forge-check [--env <env>] [--member <name>] [--forge <forge>]
|
|
3
|
-
* [--repo <owner/name>] [--branch <default>] [--require-clouds]
|
|
4
|
-
* (#4608): read the live forge, the clouds and
|
|
5
|
-
* pull-request pipelines `ci.identity.cloud` gives
|
|
6
|
-
* per expected setting.
|
|
3
|
+
* [--repo <owner/name>] [--branch <default>] [--require-clouds]
|
|
4
|
+
* [--ref-gate-status] [--json]` (#4608): read the live forge, the clouds and
|
|
5
|
+
* Pulumi Cloud against the pull-request pipelines `ci.identity.cloud` gives
|
|
6
|
+
* the workspace, one row per expected setting. With `--ref-gate-status`
|
|
7
|
+
* (#4913), for pipelines built with it, the default branch also requires
|
|
8
|
+
* the ref gate's status, named as the policy at `origin/<default>` (else
|
|
9
|
+
* `HEAD`) names it. Read-only. Exits chant's `failed` (1) on a
|
|
7
10
|
* mismatch, or with --require-clouds on a cloud left unchecked; `done` (0)
|
|
8
11
|
* otherwise. See ../../forge-check/index.ts.
|
|
9
12
|
*/
|
|
10
13
|
import { formatError } from "../format.js";
|
|
11
|
-
const USAGE = "chant ci forge-check [--env <env>] [--member <name>] [--forge github|gitlab|forgejo] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--json]";
|
|
14
|
+
const USAGE = "chant ci forge-check [--env <env>] [--member <name>] [--forge github|gitlab|forgejo] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--ref-gate-status] [--json]";
|
|
12
15
|
/** The environment chant's generated pull-request pipelines default to. */
|
|
13
16
|
const DEFAULT_ENV = "production";
|
|
14
17
|
export async function runCiForgeCheck(ctx) {
|
|
@@ -60,27 +63,41 @@ export async function runCiForgeCheck(ctx) {
|
|
|
60
63
|
});
|
|
61
64
|
const words = activeProductWords();
|
|
62
65
|
const host = target.host;
|
|
66
|
+
// #4913: with --ref-gate-status the default branch requires the ref gate's status too, named as the policy names it.
|
|
67
|
+
let gate = {};
|
|
68
|
+
const statusFor = args.refGateStatus ? (await import("../../ref-gate-rules.js")).refGateStatusFor : undefined;
|
|
63
69
|
const result = await forgeCheck({
|
|
64
70
|
target,
|
|
65
71
|
words,
|
|
66
72
|
...(args.requireClouds ? { requireClouds: true } : {}),
|
|
67
|
-
contract: (live) =>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
contract: (live) => {
|
|
74
|
+
const defaultBranch = args.branch ?? live.defaultBranch ?? "main";
|
|
75
|
+
if (statusFor)
|
|
76
|
+
gate = statusFor(found?.dir ?? process.cwd(), defaultBranch);
|
|
77
|
+
const status = gate.status;
|
|
78
|
+
return pipelineContract({
|
|
79
|
+
forge: target.kind,
|
|
80
|
+
repository: {
|
|
81
|
+
host,
|
|
82
|
+
path: live.path ?? target.repo,
|
|
83
|
+
defaultBranch,
|
|
84
|
+
...(live.ownerId ? { ownerId: live.ownerId } : {}),
|
|
85
|
+
...(live.repoId ? { repoId: live.repoId } : {}),
|
|
86
|
+
},
|
|
87
|
+
pipelines,
|
|
88
|
+
words,
|
|
89
|
+
...(status ? { refGateStatus: status } : {}),
|
|
90
|
+
});
|
|
91
|
+
},
|
|
79
92
|
}, { fetch: globalThis.fetch, env: process.env });
|
|
93
|
+
if (gate.problem)
|
|
94
|
+
return fail(`--ref-gate-status: ${gate.problem}`);
|
|
80
95
|
if (args.json)
|
|
81
96
|
console.log(JSON.stringify(result, null, 2));
|
|
82
97
|
else
|
|
83
98
|
console.log(describeForgeCheck(result));
|
|
99
|
+
if (gate.note)
|
|
100
|
+
console.error(`ci forge-check: ${gate.note}`);
|
|
84
101
|
if (!decl)
|
|
85
102
|
console.error("ci forge-check: no ci.identity.cloud in the workspace declaration, so no trust was checked");
|
|
86
103
|
else if (pipelines.length === 0)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/generated-check.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB/E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant dev generated-check [<render>...] [--json]` (#4909): render the
|
|
3
|
+
* product's declared generated files (`chantGenerated` in its root
|
|
4
|
+
* package.json) into a directory under the OS temp directory, compare each
|
|
5
|
+
* with the committed file, and exit 1 naming every one that drifted. The
|
|
6
|
+
* directory is left in place and printed. Exit 2 when the product declares
|
|
7
|
+
* no `chantGenerated`.
|
|
8
|
+
*/
|
|
9
|
+
import { checkGenerated, readGeneratedCheckConfig } from "../../generated-check.js";
|
|
10
|
+
import { formatError } from "../format.js";
|
|
11
|
+
const USAGE = "chant dev generated-check [<render>...] [--json]";
|
|
12
|
+
export async function runDevGeneratedCheck(ctx) {
|
|
13
|
+
const productDir = process.cwd();
|
|
14
|
+
let config;
|
|
15
|
+
try {
|
|
16
|
+
config = readGeneratedCheckConfig(productDir);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
|
|
20
|
+
return 2;
|
|
21
|
+
}
|
|
22
|
+
if (!config) {
|
|
23
|
+
console.error(formatError({ message: "package.json here declares no chantGenerated", hint: USAGE }));
|
|
24
|
+
return 2;
|
|
25
|
+
}
|
|
26
|
+
const only = (ctx.args.positionals ?? []).slice(1);
|
|
27
|
+
const result = await checkGenerated(productDir, config, { only });
|
|
28
|
+
if (ctx.args.json) {
|
|
29
|
+
console.log(JSON.stringify(result, null, 2));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
for (const f of result.matched)
|
|
33
|
+
console.error(` generated-check: ${f} matches its render`);
|
|
34
|
+
for (const p of result.problems)
|
|
35
|
+
console.error(`generated-check: ${p}`);
|
|
36
|
+
console.error(`generated-check: the renders are in ${result.out}`);
|
|
37
|
+
if (result.ok)
|
|
38
|
+
console.error(`generated-check: ${result.matched.length} files match ${result.renders.length} renders`);
|
|
39
|
+
}
|
|
40
|
+
return result.ok ? 0 : 1;
|
|
41
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9E;AAED;;cAEc;AACd,UAAU,WAAW;IACnB;iDAC6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;0CACsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb;;;6DAGyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE,CAMxF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8H/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6C3E;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8Q3E;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers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Ae,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoB1E;AAgBD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmE7E;AAiCD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0E/E"}
|
|
@@ -807,6 +807,9 @@ async function runLifecycleDiffLive(args) {
|
|
|
807
807
|
if (args.json) {
|
|
808
808
|
const entry = (byLexicon[lexiconName] ?? (byLexicon[lexiconName] = {}));
|
|
809
809
|
entry.resources = diff;
|
|
810
|
+
// What a confirmed-absent entity is, when the lexicon says (#4896); left out for every other lexicon.
|
|
811
|
+
if (plugin.liveAbsentStatus)
|
|
812
|
+
entry.absent = plugin.liveAbsentStatus;
|
|
810
813
|
entry.observed = observedNow; // live state (#862) — status/attributes per resource
|
|
811
814
|
if (Object.keys(observed.unobserved).length > 0)
|
|
812
815
|
entry.unobserved = observed.unobserved;
|
|
@@ -13,4 +13,17 @@ export declare function runDevLocal(ctx: CommandContext): Promise<number>;
|
|
|
13
13
|
* in the current directory that declares one.
|
|
14
14
|
*/
|
|
15
15
|
export declare function runDevBundleCheck(ctx: CommandContext): Promise<number>;
|
|
16
|
+
/**
|
|
17
|
+
* `chant dev local-image [--with <package>]... [-- <docker build arguments>]`
|
|
18
|
+
* (#4909): build a product's image with the chant the product has installed.
|
|
19
|
+
* With no docker arguments it prints the chant version the image would
|
|
20
|
+
* install (the pin, or `local-<commit>`), for a label that rebuilds the image
|
|
21
|
+
* when it changes; `--json` prints the version, the mark and the arguments.
|
|
22
|
+
* With them it runs `docker build` with `--build-arg CHANT_VERSION=<version>`
|
|
23
|
+
* and, for a `chant dev local` build, `--build-context
|
|
24
|
+
* chant-local=<product>/.chant-local` first. `--with` names a package the
|
|
25
|
+
* image installs from the tarballs besides core. Exit 1 when the local build's
|
|
26
|
+
* tarballs are missing or docker fails, 2 for a usage error.
|
|
27
|
+
*/
|
|
28
|
+
export declare function runDevLocalImage(ctx: CommandContext): Promise<number>;
|
|
16
29
|
//# sourceMappingURL=local-chant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chant.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/local-chant.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"local-chant.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/local-chant.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAgClD;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BtE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB5E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB3E"}
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
8
8
|
import { join, resolve } from "node:path";
|
|
9
9
|
import { checkBundle, readBundleCheckConfig } from "../../bundle-check.js";
|
|
10
|
-
import { installLocalChant, LocalChantError, productManifests, resetLocalChant } from "../../local-chant.js";
|
|
10
|
+
import { installLocalChant, LocalChantError, localChantImage, productManifests, resetLocalChant } from "../../local-chant.js";
|
|
11
11
|
import { formatError } from "../format.js";
|
|
12
12
|
const LOCAL_USAGE = "chant dev local <chant-dir> [--with <package>]... [--build '<command>'] [--json] | chant dev local --reset [--build '<command>']";
|
|
13
13
|
const CHECK_USAGE = "chant dev bundle-check [<package-dir>] [--json]";
|
|
14
|
+
const IMAGE_USAGE = "chant dev local-image [--with <package>]... [--json] [-- <docker build arguments>...]";
|
|
14
15
|
/** The product packages that declare `chantBundleCheck`, as directories. */
|
|
15
16
|
function checkedPackages(productDir) {
|
|
16
17
|
return productManifests(productDir)
|
|
@@ -77,6 +78,7 @@ export async function runDevLocal(ctx) {
|
|
|
77
78
|
}
|
|
78
79
|
else if (installed) {
|
|
79
80
|
console.log(`chant commit: ${installed.mark.commit}`);
|
|
81
|
+
console.log(`chant version: ${installed.packed[0]?.version ?? "none"} (local build)`);
|
|
80
82
|
}
|
|
81
83
|
return ok ? 0 : 1;
|
|
82
84
|
}
|
|
@@ -107,3 +109,42 @@ export async function runDevBundleCheck(ctx) {
|
|
|
107
109
|
console.log(JSON.stringify(results, null, 2));
|
|
108
110
|
return ok ? 0 : 1;
|
|
109
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* `chant dev local-image [--with <package>]... [-- <docker build arguments>]`
|
|
114
|
+
* (#4909): build a product's image with the chant the product has installed.
|
|
115
|
+
* With no docker arguments it prints the chant version the image would
|
|
116
|
+
* install (the pin, or `local-<commit>`), for a label that rebuilds the image
|
|
117
|
+
* when it changes; `--json` prints the version, the mark and the arguments.
|
|
118
|
+
* With them it runs `docker build` with `--build-arg CHANT_VERSION=<version>`
|
|
119
|
+
* and, for a `chant dev local` build, `--build-context
|
|
120
|
+
* chant-local=<product>/.chant-local` first. `--with` names a package the
|
|
121
|
+
* image installs from the tarballs besides core. Exit 1 when the local build's
|
|
122
|
+
* tarballs are missing or docker fails, 2 for a usage error.
|
|
123
|
+
*/
|
|
124
|
+
export async function runDevLocalImage(ctx) {
|
|
125
|
+
const docker = (ctx.args.positionals ?? []).slice(1);
|
|
126
|
+
let image;
|
|
127
|
+
try {
|
|
128
|
+
image = localChantImage(process.cwd(), { with: ctx.args.withPackages });
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
if (!(err instanceof LocalChantError))
|
|
132
|
+
throw err;
|
|
133
|
+
console.error(formatError({ message: err.message, hint: IMAGE_USAGE }));
|
|
134
|
+
return 1;
|
|
135
|
+
}
|
|
136
|
+
if (docker.length === 0) {
|
|
137
|
+
if (ctx.args.json)
|
|
138
|
+
console.log(JSON.stringify(image, null, 2));
|
|
139
|
+
else
|
|
140
|
+
console.log(image.version);
|
|
141
|
+
return 0;
|
|
142
|
+
}
|
|
143
|
+
console.error(`chant dev local-image: docker build with chant ${image.version}`);
|
|
144
|
+
const r = spawnSync("docker", ["build", ...image.args, ...docker], { cwd: process.cwd(), stdio: "inherit" });
|
|
145
|
+
if (r.error) {
|
|
146
|
+
console.error(formatError({ message: `docker build: ${r.error.message}` }));
|
|
147
|
+
return 1;
|
|
148
|
+
}
|
|
149
|
+
return r.status === 0 ? 0 : 1;
|
|
150
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAOH,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAI7F,OAAO,EACL,UAAU,EAUV,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAA0C,KAAK,YAAY,EAAuB,MAAM,wBAAwB,CAAC;AAIxH,OAAO,EAYL,KAAK,aAAa,EAGlB,KAAK,cAAc,EAKpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAA+D,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAY3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;A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,CAErH;AAoOD,mKAAmK;AACnK,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE;AAyJD,8NAA8N;AAC9N,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBzE;AAkfD,uKAAuK;AACvK,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAG1E;AAgVD,yJAAyJ;AACzJ,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAGpI;AA+oBD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMhF;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMjF;AA6LD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwC9E"}
|
package/dist/cli/handlers/pr.js
CHANGED
|
@@ -961,10 +961,14 @@ async function newMigrations(p) {
|
|
|
961
961
|
* the Ops cannot be read, nothing is checked and the plan goes on. The
|
|
962
962
|
* generated plan holds no forge token (#4295), so there the plan-note job's
|
|
963
963
|
* `pr-post` asks instead, reading the Ops at the target branch's commit.
|
|
964
|
+
* A product plan's own watches (#4888) come from `CHANT_PLAN_WATCHES`, which
|
|
965
|
+
* the generated note job sets from the pipeline.
|
|
964
966
|
*/
|
|
965
967
|
async function overdueOps(forge, member) {
|
|
966
|
-
const { overdueOpsAt } = await import("../../op/schedule-overdue.js");
|
|
967
|
-
|
|
968
|
+
const { overdueOpsAt, plannedWatchesFromEnv } = await import("../../op/schedule-overdue.js");
|
|
969
|
+
const log = (line) => console.error(formatWarning({ message: line }));
|
|
970
|
+
const watches = plannedWatchesFromEnv(process.env, log);
|
|
971
|
+
return overdueOpsAt({ forge, cwd: resolve("."), ...(member ? { member } : {}), ...(watches.length > 0 ? { watches } : {}), log });
|
|
968
972
|
}
|
|
969
973
|
/** chant components pr-apply --base <ref> [--pr <n>] [--env <env>] [--gate <name>] [--forge <kind>] [--require-review] [--before-merge [--requires <list>]] [--output <dir>] [--json] [--events-json] [--report-url <url>] */
|
|
970
974
|
export function runComponentsPrApply(ctx) {
|
|
@@ -2737,14 +2741,41 @@ export async function runComponentsPrPost(ctx) {
|
|
|
2737
2741
|
// #4628: the target branch's commit for the note's tip line, and the job summary where the forge keeps one.
|
|
2738
2742
|
...(args.tip ? { baseTip: args.tip } : {}),
|
|
2739
2743
|
...(args.forge !== "gitlab" && process.env.GITHUB_STEP_SUMMARY ? { summaryFile: process.env.GITHUB_STEP_SUMMARY } : {}),
|
|
2744
|
+
// #4899: the product plan job's run record, kept on chant/lifecycle with the note.
|
|
2745
|
+
...(args.recordRun ? { recordRun: await planRunRecorder(args.forge, args.recordRun) } : {}),
|
|
2740
2746
|
});
|
|
2741
2747
|
for (const message of posted.warnings)
|
|
2742
2748
|
console.error(formatWarning({ message }));
|
|
2743
2749
|
if (posted.refused)
|
|
2744
2750
|
console.error(formatWarning({ message: `the plan report was not used: ${posted.refused}` }));
|
|
2745
|
-
console.error(formatInfo(`pr-post: ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}`));
|
|
2751
|
+
console.error(formatInfo(`pr-post: ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}${posted.recorded ? `; run ${posted.recorded} recorded` : ""}`));
|
|
2746
2752
|
return 0;
|
|
2747
2753
|
}
|
|
2754
|
+
/**
|
|
2755
|
+
* How `pr-post --record-run <plan job>` keeps a product plan job's run
|
|
2756
|
+
* record (#4899): its run is this run on GitHub and Forgejo, named by the
|
|
2757
|
+
* plan job's key, and this pipeline on GitLab, where a re-plan's note job
|
|
2758
|
+
* runs in the re-plan's own pipeline. The record is appended to the run
|
|
2759
|
+
* ledger once, by its id, and `chant/lifecycle` is pushed.
|
|
2760
|
+
*/
|
|
2761
|
+
async function planRunRecorder(forge, job) {
|
|
2762
|
+
const { resolveCiJob, resolveCiRun } = await import("../../lifecycle/release-ledger.js");
|
|
2763
|
+
const ci = forge === "gitlab" ? resolveCiRun(process.env) : resolveCiJob(process.env);
|
|
2764
|
+
const origin = ci ? (forge === "gitlab" ? ci.runOrigin : { ...ci.runOrigin, jobId: job }) : undefined;
|
|
2765
|
+
return { ...(origin ? { origin } : {}), keep: keepPlanRunRecord };
|
|
2766
|
+
}
|
|
2767
|
+
/** Append `record` to the run ledger unless a record with its id is there, and push `chant/lifecycle` (#4899). Returns a warning when the push did not land. */
|
|
2768
|
+
async function keepPlanRunRecord(record) {
|
|
2769
|
+
const { fetchLifecycleStatus, pushLifecycleReport } = await import("../../lifecycle/git.js");
|
|
2770
|
+
const { appendRunRecord, readRunLedger } = await import("../../lifecycle/run-ledger.js");
|
|
2771
|
+
await fetchLifecycleStatus().catch(() => undefined);
|
|
2772
|
+
const { records } = await readRunLedger(record.env, record.op);
|
|
2773
|
+
if (records.some((r) => r.id === record.id))
|
|
2774
|
+
return undefined;
|
|
2775
|
+
await appendRunRecord(record);
|
|
2776
|
+
const pushed = await pushLifecycleReport();
|
|
2777
|
+
return pushed.pushed ? undefined : `the plan job's run record is on this job's chant/lifecycle only: ${pushed.pushWarning ?? "the push did not land"}`;
|
|
2778
|
+
}
|
|
2748
2779
|
/**
|
|
2749
2780
|
* The description check pr-post runs after the note (#4629), when the
|
|
2750
2781
|
* responses turn it on (`--respond description=check`, or `CHANT_RESPOND`):
|
|
@@ -2834,7 +2865,9 @@ async function runComponentsPrPostStale(ctx) {
|
|
|
2834
2865
|
* (`postOpenPlanReports`, ../../pr-post.ts). The branch is `--branch`, else
|
|
2835
2866
|
* the pipeline's own (`CI_COMMIT_BRANCH`). The plan job is `plan`, or
|
|
2836
2867
|
* `<member>-plan` with `--member`, as the gitlab lexicon names it, and the
|
|
2837
|
-
* artifact path is `--output` from the repository root.
|
|
2868
|
+
* artifact path is `--output` from the repository root. With
|
|
2869
|
+
* `--evidence-dir <dir>` (#4914) each note ends with the checks the
|
|
2870
|
+
* pipeline's signing job signed for that head. It exits 0 once it
|
|
2838
2871
|
* has posted, as `pr-post` does.
|
|
2839
2872
|
*/
|
|
2840
2873
|
async function runComponentsPrPostOpen(ctx) {
|
|
@@ -2881,6 +2914,10 @@ async function runComponentsPrPostOpen(ctx) {
|
|
|
2881
2914
|
...(description ? { description } : {}),
|
|
2882
2915
|
// #4628: the target branch's commit this pipeline runs at, which each note's tip line names.
|
|
2883
2916
|
...(args.tip ? { baseTip: args.tip } : {}),
|
|
2917
|
+
// #4899: each product plan job's run record, from its artifacts.
|
|
2918
|
+
...(args.recordRun ? { recordRun: { ...(process.env.CI_PROJECT_PATH ? { repo: process.env.CI_PROJECT_PATH } : {}), keep: keepPlanRunRecord } } : {}),
|
|
2919
|
+
// #4914: each merge request's evidence.json from this pipeline's signing job, for the note's checks line.
|
|
2920
|
+
...(args.evidenceDir ? { evidenceDir: resolve(args.evidenceDir) } : {}),
|
|
2884
2921
|
});
|
|
2885
2922
|
}
|
|
2886
2923
|
catch (err) {
|
|
@@ -2898,7 +2935,7 @@ async function runComponentsPrPostOpen(ctx) {
|
|
|
2898
2935
|
console.error(formatWarning({ message: `!${p.pr}: ${message}` }));
|
|
2899
2936
|
if (posted.refused)
|
|
2900
2937
|
console.error(formatWarning({ message: `!${p.pr}: the plan report was not used: ${posted.refused}` }));
|
|
2901
|
-
console.error(formatInfo(`pr-post: !${p.pr} ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}`));
|
|
2938
|
+
console.error(formatInfo(`pr-post: !${p.pr} ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}${posted.recorded ? `; run ${posted.recorded} recorded` : ""}`));
|
|
2902
2939
|
}
|
|
2903
2940
|
if (done.posts.length === 0)
|
|
2904
2941
|
console.error(formatInfo(`pr-post: no open merge request into ${branch} has a ${gitlabPlanJobName(member)} job`));
|
|
@@ -95,6 +95,10 @@ async function runOpWaveJobCommand(ctx) {
|
|
|
95
95
|
console.error(formatError({ message: `--decide and --${args.share !== undefined ? "share" : "group"} are two different jobs; pass one` }));
|
|
96
96
|
return 1;
|
|
97
97
|
}
|
|
98
|
+
if (args.policyOnly && (args.share !== undefined || args.group !== undefined)) {
|
|
99
|
+
console.error(formatError({ message: `--policy-only runs a wave's policy in its own or its deciding job; a --${args.share !== undefined ? "share" : "group"} job has none of its own` }));
|
|
100
|
+
return 1;
|
|
101
|
+
}
|
|
98
102
|
let spec;
|
|
99
103
|
const job = { ...(args.share !== undefined ? { share: args.share } : {}), ...(args.group !== undefined ? { group: args.group } : {}) };
|
|
100
104
|
if (args.eventsJson && args.json) {
|
|
@@ -120,12 +124,16 @@ async function runOpWaveJobCommand(ctx) {
|
|
|
120
124
|
specFile: relative(process.cwd(), path),
|
|
121
125
|
wave: args.wave,
|
|
122
126
|
...(args.decide ? { decide: true } : {}),
|
|
127
|
+
...(args.policyOnly ? { policyOnly: true } : {}),
|
|
123
128
|
...(args.share !== undefined ? { share: args.share } : {}),
|
|
124
129
|
...(args.group !== undefined ? { group: args.group } : {}),
|
|
125
130
|
...(args.base ? { base: args.base } : {}),
|
|
126
131
|
});
|
|
127
132
|
if (args.json)
|
|
128
133
|
console.log(JSON.stringify(result, null, 2));
|
|
134
|
+
// #4926: the policy step applied nothing; the wave's own step tells people how it went.
|
|
135
|
+
if (args.policyOnly)
|
|
136
|
+
return result.exitCode;
|
|
129
137
|
// #3761: tell people, when the spec says where. Delivery never changes the exit code.
|
|
130
138
|
await notifyOpWave(spec, args.wave, { result }, job);
|
|
131
139
|
// #4629: a refused wave's diff and a failed apply's triage, on the pull request or a tracking issue.
|
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAItG,OAAO,EAAkB,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAa9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAItG,OAAO,EAAkB,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAa9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AA6xDzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,qBAAqB,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,2BAA2B,EAAE,eAAe,CAAA;CAAO,GAC7K,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAsRvC,CAAC"}
|
package/dist/cli/main.js
CHANGED
|
@@ -254,18 +254,27 @@ E2E harness:
|
|
|
254
254
|
CLEAN, or the rejecting lines and exits 3.
|
|
255
255
|
|
|
256
256
|
CI:
|
|
257
|
-
ci check --base <rev> [<target>...] [--output <dir>] [--json]
|
|
257
|
+
ci check --base <rev> [<target>...] [--output <dir>] [--summary <file>] [--json]
|
|
258
258
|
Run the ci.hooks.check hooks the workspace declaration
|
|
259
259
|
at --base names, once each, or once per target with
|
|
260
260
|
perRun, with no forge token or cloud credentials in
|
|
261
261
|
their environment. Writes check-hooks.json under
|
|
262
|
-
--output (default .chant/check)
|
|
262
|
+
--output (default .chant/check), and with --summary
|
|
263
|
+
appends the report's markdown section to the file;
|
|
264
|
+
exits 1 when one failed.
|
|
263
265
|
ci evidence sign --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--no-push]
|
|
264
266
|
Sign that each named check passed at --at, with the
|
|
265
267
|
runner key in CHANT_RUNNER_KEY or --key, and keep it on
|
|
266
268
|
chant/lifecycle by the commit's tree. With --from-report
|
|
267
269
|
<dir> --result <result>, sign plan and policy from the
|
|
268
270
|
plan job's report, as a generated plan note job does.
|
|
271
|
+
With --open --job <job> --from-report <dir> -o <out>,
|
|
272
|
+
in a GitLab pipeline of the target branch, sign each
|
|
273
|
+
open merge request's settled <job> from its artifact.
|
|
274
|
+
With --from-job <job> [--claims <dir>], sign each
|
|
275
|
+
named check whose step in that job of this run and
|
|
276
|
+
commit the forge reports as passed, as a wave's
|
|
277
|
+
evidence job does (#4926).
|
|
269
278
|
ci evidence verify --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--json]
|
|
270
279
|
Verify the kept evidence for --at's tree against the
|
|
271
280
|
runner keys at --base; exits 1 when one is not current.
|
|
@@ -274,12 +283,13 @@ CI:
|
|
|
274
283
|
expectation in CHANT_JOB_GUARD, which a generated
|
|
275
284
|
op-wave job carries. Exits 1, one line per value
|
|
276
285
|
that differs, before any credential is taken.
|
|
277
|
-
ci forge-check [--env <env>] [--member <name>] [--forge <forge>] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--json]
|
|
286
|
+
ci forge-check [--env <env>] [--member <name>] [--forge <forge>] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--ref-gate-status] [--json]
|
|
278
287
|
Read the forge, each cloud's trust policy and Pulumi
|
|
279
288
|
Cloud's OIDC policies against the pipelines
|
|
280
289
|
ci.identity.cloud gives --env (default production):
|
|
281
290
|
apply environments, branch protection, required
|
|
282
291
|
statuses, and each identity trusted to its own jobs.
|
|
292
|
+
--ref-gate-status requires the ref gate's status too.
|
|
283
293
|
Read-only; exits 1 on a mismatch, and with
|
|
284
294
|
--require-clouds on a cloud it had no credentials for.
|
|
285
295
|
ci last-green [--json] [--lane <name>] [--from <rev>] The newest first-parent commit of
|
|
@@ -585,6 +595,10 @@ Ops:
|
|
|
585
595
|
pipeline runs. --decide plans and decides only;
|
|
586
596
|
--share <i> applies one share of a decided wave;
|
|
587
597
|
--group <name> applies one job group's runs.
|
|
598
|
+
--policy-only plans the wave and runs its policy
|
|
599
|
+
hold, applying nothing, and exits 0 only when the
|
|
600
|
+
policy ran and denied nothing: the wave job's
|
|
601
|
+
policy step, whose result its evidence job reads (#4926).
|
|
588
602
|
--record-plans (no --wave), in a pull request's
|
|
589
603
|
pipeline: plan every wave at its head and record the
|
|
590
604
|
digests a pr-review approval mode compares.
|
|
@@ -1044,7 +1058,8 @@ Workspace (level 1, #2524):
|
|
|
1044
1058
|
workspace ref-gate check|status --ref <ref> [--at <rev>] [--base <rev>] [--json]
|
|
1045
1059
|
Decide a ref update against the checks .chant/trust.json
|
|
1046
1060
|
at base requires for the ref; status sets the commit
|
|
1047
|
-
status a forge requires
|
|
1061
|
+
status a forge requires; status --open sets it on
|
|
1062
|
+
every open pull request into the branch (#4935)
|
|
1048
1063
|
workspace ref-gate install --hook pre-receive|pre-push [--git-dir <dir>]
|
|
1049
1064
|
Write the git hook that refuses an update whose commit
|
|
1050
1065
|
lacks current evidence for a blocking check
|
|
@@ -1463,6 +1478,14 @@ Lexicon development:
|
|
|
1463
1478
|
Check a bundle against its package.json chantBundleCheck: imports
|
|
1464
1479
|
only Node, its dependencies and chant served as compiled JS, the
|
|
1465
1480
|
dependencies on the root's chant pin, size ceilings, denied inputs
|
|
1481
|
+
dev local-image [--with <package>]... [-- <docker build args>]
|
|
1482
|
+
Print the chant an image installs (the pin, or local-<commit>
|
|
1483
|
+
after dev local), or run docker build with CHANT_VERSION and,
|
|
1484
|
+
for a local build, the chant-local build context
|
|
1485
|
+
dev generated-check [<render>...]
|
|
1486
|
+
Render the files package.json's chantGenerated declares into a
|
|
1487
|
+
directory under the OS temp dir, compare each with the committed
|
|
1488
|
+
file, and fail naming the ones that drifted
|
|
1466
1489
|
dev dead-guards [<product-dir>]
|
|
1467
1490
|
Fail naming each feature-detect on a chant floor (a floor read off
|
|
1468
1491
|
a lazily loaded module, a subpath loaded behind a catch, the
|
|
@@ -1568,6 +1591,15 @@ Options:
|
|
|
1568
1591
|
apply on merge tells it. With --control-setting
|
|
1569
1592
|
<key>=<value> (repeatable) for op, member,
|
|
1570
1593
|
readTokenSecret and the other control settings
|
|
1594
|
+
--evidence-runner-key-secret <NAME>, --evidence-identity oidc [--evidence-audience <aud>]
|
|
1595
|
+
(build --pr-loop) The runner identity the note job
|
|
1596
|
+
signs plan and policy with (#4935)
|
|
1597
|
+
--check-job (build --pr-loop) A check job that runs ci check on
|
|
1598
|
+
the pull request's commit, and with evidence a job
|
|
1599
|
+
that signs each passed hook (#4935)
|
|
1600
|
+
--ref-gate-status (build --pr-loop) A job that sets the ref gate's
|
|
1601
|
+
status on the pull request's commit (#4935); (ci
|
|
1602
|
+
forge-check) the default branch requires it (#4913)
|
|
1571
1603
|
--no-release-record Skip auto-emitting a release-ledger record after a
|
|
1572
1604
|
successful \`run --components\` deploy (default: on;
|
|
1573
1605
|
also settable via chant.config.ts's
|
|
@@ -1964,6 +1996,8 @@ export const commandRegistry = [
|
|
|
1964
1996
|
// #4787: build a product against a chant checkout, and check its bundle. Imported on first use.
|
|
1965
1997
|
{ name: "dev local", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/local-chant.js")).runDevLocal(ctx) },
|
|
1966
1998
|
{ name: "dev bundle-check", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/local-chant.js")).runDevBundleCheck(ctx) },
|
|
1999
|
+
{ name: "dev local-image", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/local-chant.js")).runDevLocalImage(ctx) },
|
|
2000
|
+
{ name: "dev generated-check", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/generated-check.js")).runDevGeneratedCheck(ctx) },
|
|
1967
2001
|
// #4792: the feature-detects on a chant floor the product's pin already meets.
|
|
1968
2002
|
{ name: "dev dead-guards", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/dead-guards.js")).runDevDeadGuards(ctx) },
|
|
1969
2003
|
// Op / run subcommands
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/cli/parse-args.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/cli/parse-args.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAgH7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA4xCpD"}
|
package/dist/cli/parse-args.js
CHANGED
|
@@ -19,6 +19,8 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
19
19
|
"--help",
|
|
20
20
|
"--open",
|
|
21
21
|
"--note-commands",
|
|
22
|
+
"--check-job",
|
|
23
|
+
"--ref-gate-status",
|
|
22
24
|
"--locks",
|
|
23
25
|
"--version",
|
|
24
26
|
"--agents",
|
|
@@ -78,6 +80,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
78
80
|
"--require-runner-start",
|
|
79
81
|
"--require-clouds",
|
|
80
82
|
"--no-push",
|
|
83
|
+
"--no-forks",
|
|
81
84
|
"--list",
|
|
82
85
|
"--no-require-review",
|
|
83
86
|
"--expire",
|
|
@@ -100,6 +103,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
100
103
|
"--root-only",
|
|
101
104
|
"--generated",
|
|
102
105
|
"--decide",
|
|
106
|
+
"--policy-only",
|
|
103
107
|
"--record-plans",
|
|
104
108
|
"--approval-status",
|
|
105
109
|
"--waves-outcome",
|
|
@@ -606,6 +610,10 @@ export function parseArgs(args) {
|
|
|
606
610
|
else if (arg === "--decide") {
|
|
607
611
|
result.decide = true;
|
|
608
612
|
}
|
|
613
|
+
else if (arg === "--policy-only") {
|
|
614
|
+
// `chant run wave --policy-only` (#4926): plan the wave and run its policy hold, as a step of its own.
|
|
615
|
+
result.policyOnly = true;
|
|
616
|
+
}
|
|
609
617
|
else if (arg === "--record-plans") {
|
|
610
618
|
result.recordPlans = true;
|
|
611
619
|
}
|
|
@@ -730,6 +738,16 @@ export function parseArgs(args) {
|
|
|
730
738
|
if (!result.fromReport || result.fromReport.startsWith("-"))
|
|
731
739
|
throw new Error("--from-report needs a report file: --from-report <pr-plan.json>");
|
|
732
740
|
}
|
|
741
|
+
else if (arg === "--from-job" || arg === "--claims") {
|
|
742
|
+
// `chant ci evidence sign --from-job <job> [--claims <dir>]` (#4926): sign from another job's step results.
|
|
743
|
+
const value = args[++i];
|
|
744
|
+
if (value === undefined || value.startsWith("-"))
|
|
745
|
+
throw new Error(arg === "--from-job" ? "--from-job needs the job's name: --from-job <job>" : "--claims needs a directory: --claims <dir>");
|
|
746
|
+
if (arg === "--from-job")
|
|
747
|
+
result.fromJob = value;
|
|
748
|
+
else
|
|
749
|
+
result.claims = value;
|
|
750
|
+
}
|
|
733
751
|
else if (arg === "--report-url") {
|
|
734
752
|
// `chant components pr-plan|pr-apply --report-url <url>` (#4007).
|
|
735
753
|
const url = args[++i];
|
|
@@ -743,6 +761,10 @@ export function parseArgs(args) {
|
|
|
743
761
|
if (!result.planResult || result.planResult.startsWith("-"))
|
|
744
762
|
throw new Error("--result needs the plan job's result: --result success|failure|cancelled");
|
|
745
763
|
}
|
|
764
|
+
else if (arg === "--no-forks") {
|
|
765
|
+
// `chant ci evidence sign --open --no-forks` (#4914): sign for no merge request from a fork.
|
|
766
|
+
result.noForks = true;
|
|
767
|
+
}
|
|
746
768
|
else if (arg === "--no-status") {
|
|
747
769
|
// `chant ci run|serve --no-status` (#4097): post no commit status for the job.
|
|
748
770
|
result.noStatus = true;
|
|
@@ -1235,6 +1257,50 @@ export function parseArgs(args) {
|
|
|
1235
1257
|
// `chant build --pr-loop --note-commands` (#4785).
|
|
1236
1258
|
result.noteCommands = true;
|
|
1237
1259
|
}
|
|
1260
|
+
else if (arg === "--check-job") {
|
|
1261
|
+
// `chant build --pr-loop --check-job` (#4935): the check job, chant ci check on the pull request's commit.
|
|
1262
|
+
result.checkJob = true;
|
|
1263
|
+
}
|
|
1264
|
+
else if (arg === "--ref-gate-status") {
|
|
1265
|
+
// `chant build --pr-loop --ref-gate-status` (#4935): the job that sets the ref gate's status; on `ci forge-check` (#4913), require it.
|
|
1266
|
+
result.refGateStatus = true;
|
|
1267
|
+
}
|
|
1268
|
+
else if (arg === "--evidence-runner-key-secret") {
|
|
1269
|
+
// `chant build --pr-loop --evidence-runner-key-secret <NAME>` (#4935): the secret holding the runner key the note job signs with.
|
|
1270
|
+
result.evidenceRunnerKeySecret = args[++i];
|
|
1271
|
+
if (!result.evidenceRunnerKeySecret || result.evidenceRunnerKeySecret.startsWith("-"))
|
|
1272
|
+
throw new Error("--evidence-runner-key-secret needs the secret holding the runner key: --evidence-runner-key-secret <NAME>");
|
|
1273
|
+
}
|
|
1274
|
+
else if (arg === "--evidence-identity") {
|
|
1275
|
+
// `chant build --pr-loop --evidence-identity oidc` (#4935, #4869): sign keyless from the job's OIDC identity.
|
|
1276
|
+
result.evidenceIdentity = args[++i];
|
|
1277
|
+
if (result.evidenceIdentity !== "oidc")
|
|
1278
|
+
throw new Error(`--evidence-identity takes oidc, the one identity chant signs keyless with: got "${result.evidenceIdentity ?? ""}"`);
|
|
1279
|
+
}
|
|
1280
|
+
else if (arg === "--evidence-audience") {
|
|
1281
|
+
// `chant build --pr-loop --evidence-identity oidc --evidence-audience <aud>` (#4935, #4869).
|
|
1282
|
+
result.evidenceAudience = args[++i];
|
|
1283
|
+
if (!result.evidenceAudience || result.evidenceAudience.startsWith("-"))
|
|
1284
|
+
throw new Error("--evidence-audience needs the OIDC token's audience: --evidence-audience <aud>");
|
|
1285
|
+
}
|
|
1286
|
+
else if (arg === "--record-run") {
|
|
1287
|
+
// `chant components pr-post --record-run <plan job>` (#4899): keep the product plan job's run record on chant/lifecycle.
|
|
1288
|
+
result.recordRun = args[++i];
|
|
1289
|
+
if (!result.recordRun || !/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(result.recordRun))
|
|
1290
|
+
throw new Error(`--record-run needs the plan job's name: got "${result.recordRun ?? ""}"`);
|
|
1291
|
+
}
|
|
1292
|
+
else if (arg === "--evidence-dir") {
|
|
1293
|
+
// `chant components pr-post --open --evidence-dir <dir>` (#4914): each merge request's evidence.json, from the GitLab signing job.
|
|
1294
|
+
result.evidenceDir = args[++i];
|
|
1295
|
+
if (!result.evidenceDir || result.evidenceDir.startsWith("-"))
|
|
1296
|
+
throw new Error("--evidence-dir needs the directory the signing job kept: --evidence-dir .chant/evidence/plan");
|
|
1297
|
+
}
|
|
1298
|
+
else if (arg === "--summary") {
|
|
1299
|
+
// `chant ci check --summary <file>` (#4914): the check report's markdown section, appended to the file.
|
|
1300
|
+
result.checkSummary = args[++i];
|
|
1301
|
+
if (!result.checkSummary || result.checkSummary.startsWith("-"))
|
|
1302
|
+
throw new Error("--summary needs a file to append the check report's section to: --summary <file>");
|
|
1303
|
+
}
|
|
1238
1304
|
else if (arg === "--locks") {
|
|
1239
1305
|
// `chant components pr-notes --locks` (#4785).
|
|
1240
1306
|
result.locks = true;
|