@intentius/chant 0.124.63 → 0.124.65
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/approve.d.ts +8 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +27 -4
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +2 -1
- package/dist/cli/handlers/release.d.ts +6 -4
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +101 -16
- package/dist/cli/handlers/run.d.ts +30 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +108 -7
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +34 -7
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +19 -0
- package/dist/cli/registry.d.ts +10 -2
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +19 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +11 -3
- package/dist/components/component.d.ts +19 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/component.schema.json +17 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/release-run.d.ts +48 -0
- package/dist/components/release-run.d.ts.map +1 -0
- package/dist/components/release-run.js +166 -0
- package/dist/components/starter-plugin.d.ts +1 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/starter-plugin.js +5 -1
- package/dist/components/unchanged-inputs.d.ts +81 -0
- package/dist/components/unchanged-inputs.d.ts.map +1 -0
- package/dist/components/unchanged-inputs.js +122 -0
- package/dist/components/verbs/index.d.ts +1 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/index.js +1 -0
- package/dist/components/verbs/release-image.d.ts +36 -0
- package/dist/components/verbs/release-image.d.ts.map +1 -0
- package/dist/components/verbs/release-image.js +33 -0
- package/dist/config.d.ts +18 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/gate-statement.schema.json +4 -2
- package/dist/lifecycle/delivery-metrics.d.ts.map +1 -1
- package/dist/lifecycle/delivery-metrics.js +4 -2
- package/dist/lifecycle/gate-ledger.d.ts +11 -2
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +6 -0
- package/dist/lifecycle/gate-seal.d.ts +20 -4
- package/dist/lifecycle/gate-seal.d.ts.map +1 -1
- package/dist/lifecycle/gate-seal.js +18 -5
- package/dist/lifecycle/gate-statement.d.ts +27 -2
- package/dist/lifecycle/gate-statement.d.ts.map +1 -1
- package/dist/lifecycle/gate-statement.js +37 -2
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +6 -1
- package/dist/lifecycle/ledger-read.js +1 -1
- package/dist/lifecycle/plan-stale.d.ts.map +1 -1
- package/dist/lifecycle/plan-stale.js +1 -2
- package/dist/lifecycle/publish-declaration.d.ts +20 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
- package/dist/lifecycle/publish-declaration.js +24 -1
- package/dist/lifecycle/publish-forge.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.js +1 -2
- package/dist/lifecycle/publish-git-ssh.d.ts +82 -0
- package/dist/lifecycle/publish-git-ssh.d.ts.map +1 -0
- package/dist/lifecycle/publish-git-ssh.js +180 -0
- package/dist/lifecycle/publish-homebrew.d.ts +11 -0
- package/dist/lifecycle/publish-homebrew.d.ts.map +1 -1
- package/dist/lifecycle/publish-homebrew.js +96 -5
- package/dist/lifecycle/publish-marketplace.d.ts +36 -2
- package/dist/lifecycle/publish-marketplace.d.ts.map +1 -1
- package/dist/lifecycle/publish-marketplace.js +173 -30
- package/dist/lifecycle/publish-tauri.d.ts.map +1 -1
- package/dist/lifecycle/publish-tauri.js +1 -2
- package/dist/lifecycle/query.d.ts +2 -2
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +3 -3
- package/dist/lifecycle/release-cut.d.ts +82 -6
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +209 -20
- package/dist/lifecycle/release-ledger.d.ts +11 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-publish.d.ts +13 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-publish.js +5 -0
- package/dist/lifecycle/release-revocation.d.ts +4 -3
- package/dist/lifecycle/release-revocation.d.ts.map +1 -1
- package/dist/lifecycle/release-revocation.js +5 -4
- package/dist/lifecycle/release-store.d.ts +49 -3
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +22 -3
- package/dist/op/gate.d.ts +1 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +2 -1
- package/dist/op/op-waves-run.js +5 -3
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +26 -6
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +284 -283
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +1 -2
- package/dist/workspace/ci-quarantine-report.d.ts.map +1 -1
- package/dist/workspace/ci-quarantine-report.js +1 -2
- package/dist/workspace/ci-quarantine.d.ts.map +1 -1
- package/dist/workspace/ci-quarantine.js +1 -2
- package/dist/workspace/delivery-metrics.schema.json +1 -1
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +1 -2
- package/dist/workspace/release-candidates.d.ts +9 -1
- package/dist/workspace/release-candidates.d.ts.map +1 -1
- package/dist/workspace/release-candidates.js +16 -5
- package/dist/workspace/release-candidates.schema.json +7 -0
- package/dist/workspace/releases.schema.json +54 -2
- package/package.json +1 -1
- package/src/cli/handlers/approve-external-signature.test.ts +105 -3
- package/src/cli/handlers/approve.ts +34 -4
- package/src/cli/handlers/pr.ts +2 -1
- package/src/cli/handlers/release.ts +91 -16
- package/src/cli/handlers/run-unchanged.e2e.test.ts +112 -0
- package/src/cli/handlers/run.ts +117 -7
- package/src/cli/main.ts +34 -7
- package/src/cli/parse-args.ts +15 -0
- package/src/cli/registry.ts +10 -2
- package/src/components/cli-support.test.ts +53 -0
- package/src/components/cli-support.ts +26 -4
- package/src/components/component.schema.json +17 -0
- package/src/components/component.ts +20 -0
- package/src/components/index.ts +1 -0
- package/src/components/registry.test.ts +1 -1
- package/src/components/release-run.test.ts +127 -0
- package/src/components/release-run.ts +188 -0
- package/src/components/starter-plugin.ts +5 -0
- package/src/components/unchanged-inputs.test.ts +98 -0
- package/src/components/unchanged-inputs.ts +151 -0
- package/src/components/verbs/index.ts +1 -0
- package/src/components/verbs/release-image.ts +52 -0
- package/src/config.ts +8 -0
- package/src/gate-statement.schema.json +4 -2
- package/src/lifecycle/delivery-metrics.ts +4 -2
- package/src/lifecycle/gate-ledger.ts +17 -2
- package/src/lifecycle/gate-seal.ts +24 -6
- package/src/lifecycle/gate-statement.ts +40 -4
- package/src/lifecycle/git.test.ts +15 -0
- package/src/lifecycle/git.ts +5 -1
- package/src/lifecycle/ledger-read.ts +1 -1
- package/src/lifecycle/plan-stale.test.ts +3 -4
- package/src/lifecycle/plan-stale.ts +1 -2
- package/src/lifecycle/publish-declaration.ts +24 -1
- package/src/lifecycle/publish-forge.ts +1 -2
- package/src/lifecycle/publish-git-ssh.ts +202 -0
- package/src/lifecycle/publish-homebrew.test.ts +181 -2
- package/src/lifecycle/publish-homebrew.ts +101 -6
- package/src/lifecycle/publish-marketplace.test.ts +158 -6
- package/src/lifecycle/publish-marketplace.ts +192 -31
- package/src/lifecycle/publish-resume.test.ts +40 -0
- package/src/lifecycle/publish-tauri.ts +1 -2
- package/src/lifecycle/query.ts +3 -3
- package/src/lifecycle/release-cut-lane.test.ts +195 -0
- package/src/lifecycle/release-cut-override.test.ts +225 -0
- package/src/lifecycle/release-cut.test.ts +45 -0
- package/src/lifecycle/release-cut.ts +262 -21
- package/src/lifecycle/release-ledger.ts +11 -0
- package/src/lifecycle/release-publish.ts +18 -0
- package/src/lifecycle/release-revocation.ts +5 -4
- package/src/lifecycle/release-store.ts +73 -5
- package/src/op/gate.ts +2 -1
- package/src/op/op-waves-run.ts +4 -2
- package/src/pr-forge.ts +25 -6
- package/src/pr-requires.test.ts +9 -0
- package/src/release-floors.ts +1 -1
- package/src/workspace/ci-green.ts +1 -2
- package/src/workspace/ci-quarantine-report.test.ts +2 -3
- package/src/workspace/ci-quarantine-report.ts +1 -2
- package/src/workspace/ci-quarantine.test.ts +2 -3
- package/src/workspace/ci-quarantine.ts +1 -2
- package/src/workspace/delivery-metrics.schema.json +1 -1
- package/src/workspace/delivery-metrics.test.ts +8 -0
- package/src/workspace/intent.ts +1 -2
- package/src/workspace/release-candidates.schema.json +7 -0
- package/src/workspace/release-candidates.ts +19 -5
- package/src/workspace/releases.schema.json +54 -2
- package/src/workspace/trust/gate-seal.test.ts +44 -0
|
@@ -71,6 +71,14 @@ export interface GateApprovalOptions {
|
|
|
71
71
|
signature?: string;
|
|
72
72
|
/** `--at <timestamp>` (#4646): the statement's time, which `--statement` fixes and `--signature` records. */
|
|
73
73
|
at?: string;
|
|
74
|
+
/**
|
|
75
|
+
* `--binding <text>` (#4697): a line the relay sets for the approver's
|
|
76
|
+
* signature to cover as well, such as a platform's deploy id and an
|
|
77
|
+
* expiry. Signed last (seal version 3) and recorded as `binding`. It goes
|
|
78
|
+
* with `--statement`, `--signature` or `--sign`, and must be the same on
|
|
79
|
+
* `--statement` and `--signature`.
|
|
80
|
+
*/
|
|
81
|
+
binding?: string;
|
|
74
82
|
/** Where the workspace and the key file are looked up from. Defaults to the process's directory. */
|
|
75
83
|
cwd?: string;
|
|
76
84
|
/** Replaces the lexicon evaluator a gate policy is loaded from. For tests. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,
|
|
1
|
+
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkDlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoKrE;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,GAAG,CAAC,EA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C,OAAO,GAAE,SAAS,iBAAiB,EAA+B,EAClE,KAAK,GAAE,eAAgC,GACtC,MAAM,EAAE,CAuCV"}
|
|
@@ -18,7 +18,7 @@ import { pushLifecycleReport, requireLifecycleLedger } from "../../lifecycle/git
|
|
|
18
18
|
import { LIFECYCLE_LOCAL_NOTE, isLifecycleLocalNote } from "../../lifecycle/local-note.js";
|
|
19
19
|
import { ledgerRecordingOff, NO_RECORD_ENV } from "../../lifecycle/no-record.js";
|
|
20
20
|
import { checkGateSignature, gateSealPayload, gateSealVersion, WEBAUTHN_SEAL_KIND } from "../../lifecycle/gate-seal.js";
|
|
21
|
-
import { gateStatement, readExternalSignature } from "../../lifecycle/gate-statement.js";
|
|
21
|
+
import { gateBindingProblem, gateStatement, readExternalSignature } from "../../lifecycle/gate-statement.js";
|
|
22
22
|
import { readFileSync } from "node:fs";
|
|
23
23
|
import { resolve as resolvePath } from "node:path";
|
|
24
24
|
import { formatError, formatWarning, formatSuccess, formatInfo } from "../format.js";
|
|
@@ -153,6 +153,7 @@ export async function runApprove(ctx) {
|
|
|
153
153
|
...(ctx.args.env !== undefined ? { environment: ctx.args.env } : {}),
|
|
154
154
|
...(ctx.args.relayedBy !== undefined ? { relayedBy: ctx.args.relayedBy } : {}),
|
|
155
155
|
...(ctx.args.at !== undefined ? { at: ctx.args.at } : {}),
|
|
156
|
+
...(ctx.args.binding !== undefined ? { binding: ctx.args.binding } : {}),
|
|
156
157
|
allowSameOrigin: ctx.args.allowSameOrigin,
|
|
157
158
|
};
|
|
158
159
|
const statement = await gateApprovalStatement(opName, gate, shared);
|
|
@@ -164,6 +165,7 @@ export async function runApprove(ctx) {
|
|
|
164
165
|
(statement.relayedBy !== null ? ` --relayed-by ${statement.relayedBy}` : "") +
|
|
165
166
|
(statement.planDigest !== null ? ` --plan ${statement.planDigest}` : "") +
|
|
166
167
|
(statement.environment !== null ? ` --env ${statement.environment}` : "") +
|
|
168
|
+
(statement.binding !== null ? ` --binding ${shellQuote(statement.binding)}` : "") +
|
|
167
169
|
` --at ${statement.timestamp} --signature <file>`));
|
|
168
170
|
return 0;
|
|
169
171
|
}
|
|
@@ -195,6 +197,7 @@ export async function runApprove(ctx) {
|
|
|
195
197
|
...(ctx.args.sign !== undefined ? { sign: ctx.args.sign } : {}),
|
|
196
198
|
...(ctx.args.signature !== undefined ? { signature: ctx.args.signature } : {}),
|
|
197
199
|
...(ctx.args.at !== undefined ? { at: ctx.args.at } : {}),
|
|
200
|
+
...(ctx.args.binding !== undefined ? { binding: ctx.args.binding } : {}),
|
|
198
201
|
...(ctx.args.relayedBy !== undefined ? { relayedBy: ctx.args.relayedBy } : {}),
|
|
199
202
|
});
|
|
200
203
|
if (!outcome.ok)
|
|
@@ -509,6 +512,14 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
509
512
|
if (opts.signature !== undefined && opts.at === undefined) {
|
|
510
513
|
return refuse("--signature needs --at <timestamp>, the statement's time, since the signature covers it", `Pass the timestamp \`chant approve ${opName} ${gate} --statement\` printed.`);
|
|
511
514
|
}
|
|
515
|
+
if (opts.binding !== undefined) {
|
|
516
|
+
if (!statementOnly && opts.signature === undefined && opts.sign === undefined) {
|
|
517
|
+
return refuse("--binding is a line the approver's signature covers, so it goes with --statement, --signature or --sign");
|
|
518
|
+
}
|
|
519
|
+
const problem = gateBindingProblem(opts.binding);
|
|
520
|
+
if (problem !== null)
|
|
521
|
+
return refuse(`--binding takes one line of printable text, and ${problem}`);
|
|
522
|
+
}
|
|
512
523
|
let timestamp = new Date().toISOString();
|
|
513
524
|
if (opts.at !== undefined) {
|
|
514
525
|
const at = Date.parse(opts.at);
|
|
@@ -531,6 +542,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
531
542
|
...(relayedBy ? { relayedBy } : {}),
|
|
532
543
|
timestamp,
|
|
533
544
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
545
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
534
546
|
};
|
|
535
547
|
if (statementOnly) {
|
|
536
548
|
const { CHANT_VERSION } = await import("../../chant-version.js");
|
|
@@ -559,8 +571,9 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
559
571
|
try {
|
|
560
572
|
const key = resolveSigningKey(opts.sign, cwd);
|
|
561
573
|
try {
|
|
562
|
-
// #3947: a seal over a checkpoint digest is seal version 2.
|
|
563
|
-
|
|
574
|
+
// #3947, #4697: a seal over a checkpoint digest is seal version 2, and one over a binding 3.
|
|
575
|
+
const version = gateSealVersion(sealed);
|
|
576
|
+
seal = { ...sealGateApproval(key.file, sealed), ...(version !== 1 ? { version } : {}) };
|
|
564
577
|
}
|
|
565
578
|
finally {
|
|
566
579
|
key.cleanup();
|
|
@@ -583,6 +596,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
583
596
|
...(relayedBy ? { relayedBy } : {}),
|
|
584
597
|
timestamp,
|
|
585
598
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
599
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
586
600
|
seal,
|
|
587
601
|
});
|
|
588
602
|
if (why !== null) {
|
|
@@ -612,6 +626,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
612
626
|
...(relayedBy ? { relayedBy } : {}),
|
|
613
627
|
timestamp,
|
|
614
628
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
629
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
615
630
|
...(seal ? { seal } : {}),
|
|
616
631
|
}).roles;
|
|
617
632
|
let policyDecision;
|
|
@@ -658,6 +673,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
658
673
|
...(url ? { url } : {}),
|
|
659
674
|
...(planDigest !== undefined ? { planDigest } : {}),
|
|
660
675
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
676
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
661
677
|
...(environment !== undefined ? { environment } : {}),
|
|
662
678
|
...(releaseDigest !== undefined ? { releaseDigest } : {}),
|
|
663
679
|
...(changeSet !== undefined ? { changeSet } : {}),
|
|
@@ -675,6 +691,8 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
675
691
|
(record.url ? ` (${record.url})` : "") +
|
|
676
692
|
(record.seal ? `, signed with ${record.seal.kind === WEBAUTHN_SEAL_KIND ? "passkey " : ""}${record.seal.key}` : "") +
|
|
677
693
|
push.suffix));
|
|
694
|
+
if (record.binding !== undefined)
|
|
695
|
+
console.error(formatInfo(`The signature also binds ${JSON.stringify(record.binding)} (--binding).`));
|
|
678
696
|
if (record.planDigest) {
|
|
679
697
|
console.error(formatInfo(`This approves the plan ${record.planDigest}` +
|
|
680
698
|
(record.environment !== undefined ? ` in environment "${record.environment}"` : "") +
|
|
@@ -735,7 +753,12 @@ function externalSeal(from, sealed, policy, cwd) {
|
|
|
735
753
|
: `the ${sig.kind === "ssh" ? "ssh signature" : "passkey's assertion"} does not verify for ${sealed.resolvedBy} over this approval's statement: ${r.reason}`,
|
|
736
754
|
};
|
|
737
755
|
}
|
|
738
|
-
|
|
756
|
+
const version = gateSealVersion(sealed);
|
|
757
|
+
return { seal: { ...candidate, key: r.key, ...(version !== 1 ? { version } : {}) } };
|
|
758
|
+
}
|
|
759
|
+
/** `text` quoted for a POSIX shell, for a command line a hint prints. */
|
|
760
|
+
function shellQuote(text) {
|
|
761
|
+
return /^[\w@%+=:,./-]+$/.test(text) ? text : `'${text.replace(/'/g, `'\\''`)}'`;
|
|
739
762
|
}
|
|
740
763
|
/**
|
|
741
764
|
* What a just-recorded approval did to a gate with an `approval` block
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAOH,OAAO,EA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) {
|
|
|
1442
1442
|
return early({ requires: [] }, "before-merge-off", `The declaration at base sets ci.workflow to ${workflow ?? "nothing"}${member ? ` for ${member}` : ""}, and only apply-before-merge applies a pull request before it merges (ws-106). Nothing was applied.`, 1);
|
|
1443
1443
|
}
|
|
1444
1444
|
// The apply's own statuses never hold it back: chant ci run's, and the report's.
|
|
1445
|
+
// Nor does the plan's: a policy denial fails it, and the denial is only recorded when the apply judges it (plywood#66).
|
|
1445
1446
|
// #4550: under a product's words its own prefix too.
|
|
1446
|
-
const ignore = [...new Set([productContext(activeProductWords(), gate), productContext(activeProductWords(), PR_APPLY_GATE), `chant/${gate}`, `chant/${PR_APPLY_GATE}`, prStatusContext("apply", member)])];
|
|
1447
|
+
const ignore = [...new Set([productContext(activeProductWords(), gate), productContext(activeProductWords(), PR_APPLY_GATE), `chant/${gate}`, `chant/${PR_APPLY_GATE}`, prStatusContext("apply", member), prStatusContext("plan"), `${prStatusContext("plan")}/`])];
|
|
1447
1448
|
// ws-106 gives the declaration no way to leave a check out, so with no --requires all four are asked (#4336, #4607).
|
|
1448
1449
|
const requires = await checkPrRequires(forge, args.pr, head, { ignore, ...(only ? { only: only.checks } : {}) });
|
|
1449
1450
|
for (const r of requires)
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `chant release` (#4026, ws-104): the release is what graduates.
|
|
3
3
|
*
|
|
4
|
-
* release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param k=v]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--json]
|
|
4
|
+
* release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param k=v]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--lane <name>] [--json]
|
|
5
5
|
* a dry run of a cut of this member from the checkout's HEAD, which must be
|
|
6
|
-
* clean, on trunk and pushed, and green (#4027)
|
|
6
|
+
* clean, on trunk and pushed, and green (#4027), or green in a lane with
|
|
7
|
+
* `--lane` or `release.lane` (#4692); `--yes` cuts, records,
|
|
7
8
|
* and tags the commit `release/<label>` locally;
|
|
8
|
-
* --sign signs the cut with the actor's ssh key (#4031); `--
|
|
9
|
+
* --sign signs the cut with the actor's ssh key (#4031); `--override-green`
|
|
10
|
+
* cuts a commit that is not green under a person's override (#4693); `--src`, `-o` and
|
|
9
11
|
* `--lexicon` shape the build of a project with no components (#4046)
|
|
10
12
|
* release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json]
|
|
11
13
|
* publish a cut release (#4027) to the targets release.publish declares
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
* release verify <label|digest> [--json]
|
|
18
20
|
* check the release's signature offline against .chant/allowed_signers
|
|
19
21
|
* at the release's commit (#4049)
|
|
20
|
-
* release candidates [--env <env>] [--forge-issues] [--json]
|
|
22
|
+
* release candidates [--env <env>] [--lane <name>] [--forge-issues] [--json]
|
|
21
23
|
* the green commits of trunk a release can be cut from, each with what it
|
|
22
24
|
* would ship, and what each environment runs (#4168 4.2)
|
|
23
25
|
* release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/release.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyBlD,0HAA0H;AAC1H,wBAAgB,YAAY,CAAC,GAAG,EAAE;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uFAAuF;IACvF,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,MAAM,EAAE,CASX;AAED,wGAAwG;AACxG,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAG3D;AAkCD;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmSxE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6G5E;AAQD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC3E;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkD/E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmCzE;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyC3E;AAED,gHAAgH;AAChH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB5E;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAG5E;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD5E"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `chant release` (#4026, ws-104): the release is what graduates.
|
|
3
3
|
*
|
|
4
|
-
* release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param k=v]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--json]
|
|
4
|
+
* release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param k=v]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--lane <name>] [--json]
|
|
5
5
|
* a dry run of a cut of this member from the checkout's HEAD, which must be
|
|
6
|
-
* clean, on trunk and pushed, and green (#4027)
|
|
6
|
+
* clean, on trunk and pushed, and green (#4027), or green in a lane with
|
|
7
|
+
* `--lane` or `release.lane` (#4692); `--yes` cuts, records,
|
|
7
8
|
* and tags the commit `release/<label>` locally;
|
|
8
|
-
* --sign signs the cut with the actor's ssh key (#4031); `--
|
|
9
|
+
* --sign signs the cut with the actor's ssh key (#4031); `--override-green`
|
|
10
|
+
* cuts a commit that is not green under a person's override (#4693); `--src`, `-o` and
|
|
9
11
|
* `--lexicon` shape the build of a project with no components (#4046)
|
|
10
12
|
* release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json]
|
|
11
13
|
* publish a cut release (#4027) to the targets release.publish declares
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
* release verify <label|digest> [--json]
|
|
18
20
|
* check the release's signature offline against .chant/allowed_signers
|
|
19
21
|
* at the release's commit (#4049)
|
|
20
|
-
* release candidates [--env <env>] [--forge-issues] [--json]
|
|
22
|
+
* release candidates [--env <env>] [--lane <name>] [--forge-issues] [--json]
|
|
21
23
|
* the green commits of trunk a release can be cut from, each with what it
|
|
22
24
|
* would ship, and what each environment runs (#4168 4.2)
|
|
23
25
|
* release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json]
|
|
@@ -43,7 +45,7 @@ import { existsSync } from "node:fs";
|
|
|
43
45
|
import { resolve } from "node:path";
|
|
44
46
|
import { formatBold, formatError, formatSuccess, formatWarning } from "../format.js";
|
|
45
47
|
import { parseParamFlags } from "../build-params-cli.js";
|
|
46
|
-
const USAGE = "chant release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param <k=v>] [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--channel <tag>] [--json] | release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json] | release verify <label|digest> [--json] | release candidates [--env <env>] [--forge-issues] [--json] | release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json] | release list [--json] | release export <label|digest> --env <env> [-o <dir>] [--json]";
|
|
48
|
+
const USAGE = "chant release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param <k=v>] [--image <component>=<repository>@sha256:<hex>] [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--channel <tag>] [--lane <name>] [--override-green] [--json] | release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json] | release verify <label|digest> [--json] | release candidates [--env <env>] [--lane <name>] [--forge-issues] [--json] | release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json] | release list [--json] | release export <label|digest> --env <env> [-o <dir>] [--json]";
|
|
47
49
|
/** The build inputs `release cut` and `release compile` share. */
|
|
48
50
|
function compileInputs(ctx, params, projectDir = resolve("."), releaseLabel) {
|
|
49
51
|
const { args } = ctx;
|
|
@@ -75,6 +77,25 @@ export function sameWithYes(argv) {
|
|
|
75
77
|
const quote = (a) => (/^[\w@%+=:,./-]+$/.test(a) ? a : `'${a.replace(/'/g, `'\\''`)}'`);
|
|
76
78
|
return ["chant", ...argv.filter((a) => a !== "--json" && a !== "--yes"), "--yes"].map(quote).join(" ");
|
|
77
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* The green lane a cut or a candidates read checks (#4692): `--lane`, else
|
|
82
|
+
* `release.lane` in the member's chant.config.ts at `cwd`, else none. A
|
|
83
|
+
* config that can't be loaded is warned about and read as naming none, so the
|
|
84
|
+
* full green tag is checked.
|
|
85
|
+
*/
|
|
86
|
+
async function laneOf(ctx, cwd) {
|
|
87
|
+
if (ctx.args.lane !== undefined)
|
|
88
|
+
return ctx.args.lane;
|
|
89
|
+
try {
|
|
90
|
+
const { loadChantConfig } = await import("../../config.js");
|
|
91
|
+
return (await loadChantConfig(cwd)).config.release?.lane;
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
if (!ctx.args.json)
|
|
95
|
+
console.error(formatWarning({ message: `release.lane was not read, so the full green tag is checked: ${err instanceof Error ? err.message : String(err)}` }));
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
78
99
|
function describeActorSource(source) {
|
|
79
100
|
switch (source) {
|
|
80
101
|
case "flag":
|
|
@@ -110,6 +131,14 @@ export async function runReleaseCut(ctx) {
|
|
|
110
131
|
return 1;
|
|
111
132
|
}
|
|
112
133
|
const label = positional ?? args.label ?? null;
|
|
134
|
+
// #4693: the reason is the override's, written by the person who overrides.
|
|
135
|
+
if (args.reason !== undefined) {
|
|
136
|
+
console.error(formatError({
|
|
137
|
+
message: "release cut takes no --reason: an override's reason is on the override itself",
|
|
138
|
+
hint: "Cut with --override-green: it names the chant approve policy-override command that records the override and its reason.",
|
|
139
|
+
}));
|
|
140
|
+
return 1;
|
|
141
|
+
}
|
|
113
142
|
const dryRun = args.yes !== true;
|
|
114
143
|
const cwd = resolve(".");
|
|
115
144
|
const { spawnTargetCompiler, ReleaseCompileError } = await import("../../components/release-compile.js");
|
|
@@ -209,11 +238,26 @@ export async function runReleaseCut(ctx) {
|
|
|
209
238
|
const tag = label !== null && commit !== null && top ? { name: ws.releaseTagName(member, label), state: ws.checkReleaseTag(top, ws.releaseTagName(member, label), commit) } : null;
|
|
210
239
|
const ci = resolveCiRun(process.env);
|
|
211
240
|
const params = parseParamFlags(args.param);
|
|
241
|
+
// #4694: images built elsewhere, handed to the cut by digest, one per component.
|
|
242
|
+
const images = {};
|
|
243
|
+
for (const value of args.images ?? []) {
|
|
244
|
+
const eq = value.indexOf("=");
|
|
245
|
+
const component = eq > 0 ? value.slice(0, eq) : "";
|
|
246
|
+
if (!component || eq === value.length - 1) {
|
|
247
|
+
return fail("release-image-invalid", `--image ${value}: name the component and the image, as --image <component>=<repository>@sha256:<hex>`);
|
|
248
|
+
}
|
|
249
|
+
if (images[component] !== undefined && images[component] !== value.slice(eq + 1)) {
|
|
250
|
+
return fail("release-image-invalid", `--image names two images for "${component}"; a release records one image per component`);
|
|
251
|
+
}
|
|
252
|
+
images[component] = value.slice(eq + 1);
|
|
253
|
+
}
|
|
212
254
|
// --at: the cut reads, compiles and builds the commit's tree, not the checkout's.
|
|
213
255
|
if (args.at !== undefined && top && commit)
|
|
214
256
|
checkout = at.checkoutCommit(top, cwd, commit);
|
|
215
257
|
const cutCwd = checkout?.memberDir ?? cwd;
|
|
216
258
|
const compiler = spawnTargetCompiler(compileInputs(ctx, params, cutCwd, label));
|
|
259
|
+
// #4692: the lane is the commit's own config's under --at.
|
|
260
|
+
const lane = await laneOf(ctx, cutCwd);
|
|
217
261
|
const request = {
|
|
218
262
|
cwd: cutCwd,
|
|
219
263
|
compiler,
|
|
@@ -222,6 +266,9 @@ export async function runReleaseCut(ctx) {
|
|
|
222
266
|
...(args.sign !== undefined ? { sign: args.sign } : {}),
|
|
223
267
|
...(composed ? { composed } : {}),
|
|
224
268
|
...(args.channel ? { channel: args.channel } : {}),
|
|
269
|
+
...(lane !== undefined ? { lane } : {}),
|
|
270
|
+
...(args.overrideGreen ? { overrideGreen: true } : {}),
|
|
271
|
+
...(Object.keys(images).length > 0 ? { images } : {}),
|
|
225
272
|
};
|
|
226
273
|
if (dryRun) {
|
|
227
274
|
const plan = await planRelease(request);
|
|
@@ -254,14 +301,21 @@ export async function runReleaseCut(ctx) {
|
|
|
254
301
|
return 0;
|
|
255
302
|
}
|
|
256
303
|
const name = plan.label ? formatBold(plan.label) : "an unlabelled release";
|
|
304
|
+
const greenIn = plan.override
|
|
305
|
+
? `not green: no ${plan.override.tag.slice(0, plan.override.tag.lastIndexOf("/"))} tag`
|
|
306
|
+
: plan.lane !== null
|
|
307
|
+
? `green in lane ${plan.lane}`
|
|
308
|
+
: "green";
|
|
257
309
|
const where = composed
|
|
258
|
-
? ` (on ${trunk.remote}/${composed.branch}, composed on ${composed.base.slice(0, 12)} from ${composed.sources.length} trunk commit(s),
|
|
310
|
+
? ` (on ${trunk.remote}/${composed.branch}, composed on ${composed.base.slice(0, 12)} from ${composed.sources.length} trunk commit(s), ${greenIn})`
|
|
259
311
|
: trunk
|
|
260
|
-
? ` (on ${trunk.remote}/${trunk.branch},
|
|
312
|
+
? ` (on ${trunk.remote}/${trunk.branch}, ${greenIn})`
|
|
261
313
|
: "";
|
|
262
314
|
console.log(`Dry run: cut ${name} from commit ${plan.commit.slice(0, 12)}${where}`);
|
|
263
315
|
if (args.channel)
|
|
264
316
|
console.log(` channel ${args.channel}: a publish moves ${args.channel}, not latest`);
|
|
317
|
+
if (plan.override)
|
|
318
|
+
console.log(` under the override by ${plan.override.by} at ${plan.override.at}${plan.override.sealed ? ", sealed" : ""}: ${plan.override.reason}; the cut spends it`);
|
|
265
319
|
if (plan.alreadyCut)
|
|
266
320
|
console.log(` already cut as ${plan.alreadyCut}: the cut would record nothing new`);
|
|
267
321
|
console.log(` actor ${actor} (from ${describeActorSource(who.source)})`);
|
|
@@ -279,6 +333,8 @@ export async function runReleaseCut(ctx) {
|
|
|
279
333
|
console.log(` ${b.component}: artifacts built in ${b.env}`);
|
|
280
334
|
for (const r of plan.reused)
|
|
281
335
|
console.log(` ${r.component}: artifacts unchanged, carried from ${r.from}`);
|
|
336
|
+
for (const h of plan.handed)
|
|
337
|
+
console.log(` ${h.component}: image ${h.ref}, handed to the cut, not built`);
|
|
282
338
|
console.log(` digest ${plan.releaseDigest ?? "decided when the artifacts are built"}`);
|
|
283
339
|
console.log("What will be published where:");
|
|
284
340
|
if (plan.publishSteps.length === 0)
|
|
@@ -325,7 +381,7 @@ export async function runReleaseCut(ctx) {
|
|
|
325
381
|
noComponents: result.release.targets.every((t) => t.templates.every((tpl) => tpl.component === null)) && result.release.artifactDigests.length === 0,
|
|
326
382
|
});
|
|
327
383
|
if (args.json) {
|
|
328
|
-
console.log(JSON.stringify({ dryRun: false, release: result.release, label: result.label, cut: result.cut, stored: result.stored, reused: result.reused, actor, actorSource: who.source, tag: tagged, composed: composed ?? null, channel: args.channel ?? null, next }, null, 2));
|
|
384
|
+
console.log(JSON.stringify({ dryRun: false, release: result.release, label: result.label, cut: result.cut, stored: result.stored, reused: result.reused, handed: result.handed, actor, actorSource: who.source, tag: tagged, composed: composed ?? null, channel: args.channel ?? null, lane: lane ?? null, next }, null, 2));
|
|
329
385
|
}
|
|
330
386
|
else {
|
|
331
387
|
const name = result.label ? formatBold(result.label) : "unlabelled release";
|
|
@@ -333,14 +389,18 @@ export async function runReleaseCut(ctx) {
|
|
|
333
389
|
console.error(formatSuccess(`Cut ${name}: ${result.release.releaseDigest}`));
|
|
334
390
|
else
|
|
335
391
|
console.error(formatSuccess(`Already cut${result.label ? ` as ${formatBold(result.label)}` : ""}: ${result.release.releaseDigest}`));
|
|
336
|
-
console.error(` commit ${result.release.commit}${composed ? `, composed on ${composed.base.slice(0, 12)} on ${composed.branch}` : ""}`);
|
|
392
|
+
console.error(` commit ${result.release.commit}${composed ? `, composed on ${composed.base.slice(0, 12)} on ${composed.branch}` : ""}${lane !== undefined ? `, green in lane ${lane}` : ""}`);
|
|
337
393
|
if (args.channel)
|
|
338
394
|
console.error(` channel ${args.channel}`);
|
|
395
|
+
if (result.cut?.override)
|
|
396
|
+
console.error(` not green: cut under the override by ${result.cut.override.by}: ${result.cut.override.reason}`);
|
|
339
397
|
if (result.cut)
|
|
340
398
|
console.error(` ${result.cut.signature ? `signed by ${result.cut.actor}` : `not signed; actor ${result.cut.actor}`}, run ${result.cut.runId}`);
|
|
341
399
|
console.error(` artifacts ${result.release.artifactDigests.length}, targets ${result.release.targets.map((t) => `${t.env} (${t.templates.length} template${t.templates.length === 1 ? "" : "s"})`).join(", ")}`);
|
|
342
400
|
for (const r of result.reused)
|
|
343
401
|
console.error(` ${r.component}: artifacts unchanged, carried from ${r.from}`);
|
|
402
|
+
for (const h of result.handed)
|
|
403
|
+
console.error(` ${h.component}: image ${h.ref}, handed to the cut`);
|
|
344
404
|
if (tagged)
|
|
345
405
|
console.error(` tag ${tagged.name}${tagged.created ? "" : " (already there)"}, not pushed`);
|
|
346
406
|
console.error(`Next: ${next[0]}`);
|
|
@@ -356,6 +416,13 @@ export async function runReleaseCut(ctx) {
|
|
|
356
416
|
}
|
|
357
417
|
catch (err) {
|
|
358
418
|
if (err instanceof ws.WorkstationCheckError || err instanceof ReleaseCutError || err instanceof at.CutAtError) {
|
|
419
|
+
// #4693: a request for an override goes where the person who answers it reads.
|
|
420
|
+
if (err instanceof ReleaseCutError && err.recorded) {
|
|
421
|
+
const { pushLifecycleReport } = await import("../../lifecycle/git.js");
|
|
422
|
+
const push = await pushLifecycleReport({ cwd }).catch(() => ({ pushed: false, pushWarning: undefined }));
|
|
423
|
+
if (push.pushWarning)
|
|
424
|
+
console.error(formatWarning({ message: push.pushWarning }));
|
|
425
|
+
}
|
|
359
426
|
return fail(err.code, err.message, err.fix);
|
|
360
427
|
}
|
|
361
428
|
if (err instanceof ReleaseLabelError)
|
|
@@ -500,8 +567,9 @@ export async function runReleasePublish(ctx) {
|
|
|
500
567
|
else {
|
|
501
568
|
for (const p of published)
|
|
502
569
|
for (const i of p.items)
|
|
503
|
-
say(` ${i.present ? "already there" : "published"}: ${describeItem(i)}`);
|
|
504
|
-
|
|
570
|
+
say(` ${i.refused ? "refused" : i.present ? "already there" : "published"}: ${describeItem(i)}`);
|
|
571
|
+
const refused = published.filter((p) => p.warning);
|
|
572
|
+
console.error(formatSuccess(`Published ${name} to ${published.length - refused.length} target(s)${refused.length > 0 ? `; ${refused.length} refused it, with a warning` : ""}`));
|
|
505
573
|
}
|
|
506
574
|
return 0;
|
|
507
575
|
}
|
|
@@ -561,7 +629,14 @@ export async function runReleaseVerify(ctx) {
|
|
|
561
629
|
*/
|
|
562
630
|
export async function runReleaseCandidates(ctx) {
|
|
563
631
|
const { releaseCandidatesDocument } = await import("../../workspace/release-candidates.js");
|
|
564
|
-
const
|
|
632
|
+
const lane = await laneOf(ctx, resolve("."));
|
|
633
|
+
const doc = await releaseCandidatesDocument({
|
|
634
|
+
cwd: resolve("."),
|
|
635
|
+
...(ctx.args.env ? { env: ctx.args.env } : {}),
|
|
636
|
+
...(ctx.args.branch ? { branch: ctx.args.branch } : {}),
|
|
637
|
+
...(lane !== undefined ? { lane } : {}),
|
|
638
|
+
...(ctx.args.forgeIssues ? { forgeIssues: {} } : {}),
|
|
639
|
+
});
|
|
565
640
|
if (ctx.args.json) {
|
|
566
641
|
console.log(JSON.stringify(doc, null, 2));
|
|
567
642
|
return "error" in doc ? 1 : 0;
|
|
@@ -578,10 +653,13 @@ export async function runReleaseCandidates(ctx) {
|
|
|
578
653
|
console.error(`No candidates: this clone knows no ${doc.branch}. Fetch it: git fetch origin ${doc.branch} --tags`);
|
|
579
654
|
return 0;
|
|
580
655
|
}
|
|
656
|
+
const greenIn = doc.lane !== null ? `green in lane ${doc.lane}` : "green";
|
|
657
|
+
if (doc.lane !== null)
|
|
658
|
+
console.log(`Lane ${doc.lane}: candidates carry ci/green-${doc.lane}/<sha>`);
|
|
581
659
|
if (doc.pending.length > 0)
|
|
582
|
-
console.log(`${doc.pending.length} commit(s) on ${doc.branch} after the newest candidate are not
|
|
660
|
+
console.log(`${doc.pending.length} commit(s) on ${doc.branch} after the newest candidate are not ${greenIn} yet`);
|
|
583
661
|
if (doc.candidates.length === 0)
|
|
584
|
-
console.log(`No
|
|
662
|
+
console.log(`No ${greenIn} commit on ${doc.branch}${doc.since ? ` since ${doc.since.slice(0, 12)}` : ""} to cut from.`);
|
|
585
663
|
for (const c of doc.candidates) {
|
|
586
664
|
const tags = [...(c.newFor.length > 0 ? [`new for ${c.newFor.join(", ")}`] : []), ...(c.cut.length > 0 ? [`cut as ${c.cut.join(", ")}`] : [])];
|
|
587
665
|
console.log(`${c.commit.slice(0, 12)} ${c.subject}${tags.length > 0 ? ` (${tags.join("; ")})` : ""}`);
|
|
@@ -605,7 +683,7 @@ export async function runReleaseCandidates(ctx) {
|
|
|
605
683
|
for (const r of unread)
|
|
606
684
|
console.error(`Issues not read from the forge: ${r}`);
|
|
607
685
|
if (doc.candidates.length > 0)
|
|
608
|
-
console.error(`Cut one: chant release cut <label> --at <sha
|
|
686
|
+
console.error(`Cut one: chant release cut <label> --at <sha>${doc.lane !== null && ctx.args.lane !== undefined ? ` --lane ${doc.lane}` : ""}`);
|
|
609
687
|
return 0;
|
|
610
688
|
}
|
|
611
689
|
export async function runReleaseList(ctx) {
|
|
@@ -631,9 +709,16 @@ export async function runReleaseList(ctx) {
|
|
|
631
709
|
const newest = r.cuts.at(-1);
|
|
632
710
|
const signature = newest ? (newest.signatureCheck.status === "verified" ? `signed by ${newest.actor}` : newest.signatureCheck.status) : "-";
|
|
633
711
|
// #4033: a release cut from a revoked commit says so at the end of its line, and why on stderr.
|
|
634
|
-
|
|
712
|
+
// #4692: a release cut from a lane's green tag names the lane.
|
|
713
|
+
const lane = r.cuts.find((c) => c.lane !== undefined)?.lane;
|
|
714
|
+
const overridden = r.cuts.some((c) => c.override !== undefined);
|
|
715
|
+
console.log(`${(r.label ?? "-").padEnd(16)} ${r.releaseDigest} ${r.commit.slice(0, 12)} ${signature} ${where}${lane !== undefined ? ` lane ${lane}` : ""}${overridden ? " not green" : ""}${r.revoked ? " revoked" : ""}`);
|
|
635
716
|
if (newest?.signatureCheck.status === "unverified")
|
|
636
717
|
console.error(` ${r.label ?? r.releaseDigest}: ${newest.signatureCheck.reason}`);
|
|
718
|
+
// #4693: a release cut under an override says the commit was not green.
|
|
719
|
+
for (const c of r.cuts)
|
|
720
|
+
if (c.override)
|
|
721
|
+
console.error(` ${r.label ?? r.releaseDigest}: not green (no ${c.override.tag}), cut under the override by ${c.override.by}: ${c.override.reason}`);
|
|
637
722
|
if (r.revoked) {
|
|
638
723
|
const { describeRevocation } = await import("../../lifecycle/release-revocation.js");
|
|
639
724
|
console.error(` ${r.label ?? r.releaseDigest}: revoked by ${r.revoked.tag}, ${describeRevocation(r.revoked)}`);
|
|
@@ -154,14 +154,43 @@ appliedDigestOf?: (component: string) => AppliedDigest | null): Promise<ReleaseR
|
|
|
154
154
|
export declare function runOpComponents(ctx: CommandContext): Promise<number>;
|
|
155
155
|
/**
|
|
156
156
|
* Resolve the release `chant run --components --release` names (#4043), or the
|
|
157
|
-
* reason it can't be used. The run
|
|
157
|
+
* reason it can't be used. The run's compositions are the checkout's, so the
|
|
158
158
|
* release's commit must be HEAD, and the release needs a target for `env`.
|
|
159
|
+
* The artifacts it deploys are the release's own (#4694, ../../components/release-run.ts).
|
|
159
160
|
*/
|
|
160
161
|
export declare function resolveRunRelease(ref: string, env: string, cwd: string): Promise<string | {
|
|
161
162
|
releaseDigest: string;
|
|
162
163
|
label: string | null;
|
|
163
164
|
release: import("../../lifecycle/release-store.js").Release;
|
|
164
165
|
}>;
|
|
166
|
+
/**
|
|
167
|
+
* Record each component the run left alone (#4695): a record of the release
|
|
168
|
+
* repeating the deploy that stays, named in `unchangedSince`. One whose
|
|
169
|
+
* latest record already names the release gets none. Never fails the run.
|
|
170
|
+
*/
|
|
171
|
+
export declare function recordSkips(skipped: Skipped, releaseDigest: string, run: {
|
|
172
|
+
runId: string;
|
|
173
|
+
runOrigin?: RunOrigin;
|
|
174
|
+
}, cwd: string): Promise<ReleaseRecord[]>;
|
|
175
|
+
/** A component a run under a release left alone (#4695), and the deploy that stays. */
|
|
176
|
+
export type Skipped = Map<string, import("../../components/unchanged-inputs.js").InputsVerdict & {
|
|
177
|
+
unchanged: true;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* The compositions of a run under a release (#4694): each component the release
|
|
181
|
+
* recorded an artifact for runs from it, with what was taken out printed to
|
|
182
|
+
* stderr, or the run is refused with every reason. Unless `deployUnchanged`,
|
|
183
|
+
* a component whose declared inputs are the same as in the release `env` runs
|
|
184
|
+
* it from runs nothing and is added to `skipped` (#4695).
|
|
185
|
+
*/
|
|
186
|
+
export declare function releaseRunPrepare(under: {
|
|
187
|
+
releaseDigest: string;
|
|
188
|
+
label: string | null;
|
|
189
|
+
release: import("../../lifecycle/release-store.js").Release;
|
|
190
|
+
}, projectPath: string, env: string, skip: {
|
|
191
|
+
deployUnchanged: boolean;
|
|
192
|
+
skipped: Skipped;
|
|
193
|
+
}): NonNullable<import("../../components/cli-support.js").RunComponentsOptions["prepare"]>;
|
|
165
194
|
/** Why `run --components <selector> --adopt` cannot run here, or `undefined` (#4537). */
|
|
166
195
|
export declare function adoptRefusal(selector: string, runtime: string): {
|
|
167
196
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/run.ts"],"names":[],"mappings":"AAOA,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAkD,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1G,OAAO,KAAK,EAAqB,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAMpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAYlD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAA6D,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9H,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIxF,OAAO,EAA+B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAIjH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAqB,CAAC;AA+BlD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,GAAG,OAAO,CAMjF;AAED;;;;;GAKG;AACH,wBAAgB,o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