@tablation/crew 0.13.0 → 0.13.2
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.js +27 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1962,6 +1962,16 @@ async function notify(route, ship, n, emit, dryRun = false) {
|
|
|
1962
1962
|
return false;
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
|
+
function withHookTail(detail, f) {
|
|
1966
|
+
if (!f || !f.tail) return detail;
|
|
1967
|
+
return `${detail}
|
|
1968
|
+
|
|
1969
|
+
The \`${f.hook}\` hook (\`${f.label}\`) printed, last lines:
|
|
1970
|
+
|
|
1971
|
+
\`\`\`
|
|
1972
|
+
${f.tail}
|
|
1973
|
+
\`\`\``;
|
|
1974
|
+
}
|
|
1965
1975
|
function describeRelease(o, route) {
|
|
1966
1976
|
if (o.integrated) {
|
|
1967
1977
|
return {
|
|
@@ -1989,17 +1999,24 @@ function describeRelease(o, route) {
|
|
|
1989
1999
|
return {
|
|
1990
2000
|
level: "fail",
|
|
1991
2001
|
headline: `${route}: release blocked \u2014 setup failed`,
|
|
1992
|
-
detail:
|
|
2002
|
+
detail: withHookTail(
|
|
2003
|
+
"the setup hook failed in the release checkout; the target stays on the previous release",
|
|
2004
|
+
o.hookFailure
|
|
2005
|
+
)
|
|
1993
2006
|
};
|
|
1994
2007
|
}
|
|
1995
2008
|
if (o.stopped === "deploy failed") {
|
|
1996
|
-
return {
|
|
2009
|
+
return {
|
|
2010
|
+
level: "fail",
|
|
2011
|
+
headline: `${route}: deploy FAILED`,
|
|
2012
|
+
detail: withHookTail("nothing new is live", o.hookFailure)
|
|
2013
|
+
};
|
|
1997
2014
|
}
|
|
1998
2015
|
if (o.stopped === "build failed") {
|
|
1999
2016
|
return {
|
|
2000
2017
|
level: "fail",
|
|
2001
2018
|
headline: `${route}: build FAILED`,
|
|
2002
|
-
detail: "the target stays on the previous release \u2014 nothing was deployed"
|
|
2019
|
+
detail: withHookTail("the target stays on the previous release \u2014 nothing was deployed", o.hookFailure)
|
|
2003
2020
|
};
|
|
2004
2021
|
}
|
|
2005
2022
|
if (o.blockedCycles && o.blockedCycles >= 2) {
|
|
@@ -5979,6 +5996,10 @@ function summarizeOutcome(o, scope, hadTestHook) {
|
|
|
5979
5996
|
detail: `${o.merged.length} merged${o.version ? `, ${o.version}` : ""}${o.tag ? `, tagged ${o.tag}` : ""}`
|
|
5980
5997
|
};
|
|
5981
5998
|
}
|
|
5999
|
+
var HOOK_FAILURE_TAIL_LINES = 15;
|
|
6000
|
+
function hookFailure(o, name, output) {
|
|
6001
|
+
return { hook: name, label: hookLabel(o.repo, name), tail: lastLines(output, HOOK_FAILURE_TAIL_LINES) };
|
|
6002
|
+
}
|
|
5982
6003
|
function looksLikeWorkerCrash(output) {
|
|
5983
6004
|
const crashSignature = /worker process was terminated by another process|signal=SIG(SEGV|ABRT|BUS)/i;
|
|
5984
6005
|
const assertionDiff = /(AssertionError|Expected:|Received:|✕|not ok \d)/;
|
|
@@ -6450,7 +6471,7 @@ async function mergeAndRelease(o, decision, fresh, releaseBranch) {
|
|
|
6450
6471
|
const r = await hook(o, "setup");
|
|
6451
6472
|
if (r && r.code !== 0) {
|
|
6452
6473
|
o.emit.error(`setup FAILED (exit ${r.code}) \u2014 not testing or deploying; the target stays on the previous release`);
|
|
6453
|
-
return { merged, conflicts, unbuildable, deployed: false, stopped: "setup failed", decision };
|
|
6474
|
+
return { merged, conflicts, unbuildable, deployed: false, stopped: "setup failed", decision, hookFailure: hookFailure(o, "setup", r.output) };
|
|
6454
6475
|
}
|
|
6455
6476
|
}
|
|
6456
6477
|
}
|
|
@@ -6504,7 +6525,7 @@ async function mergeAndRelease(o, decision, fresh, releaseBranch) {
|
|
|
6504
6525
|
git(o.cwd, ["reset", "--hard", preBump]);
|
|
6505
6526
|
o.emit.warn(`dropped the unreleased version commit for ${version} (reset ${o.repo.branch.base} to ${preBump.slice(0, 8)}) so a retry starts clean`);
|
|
6506
6527
|
}
|
|
6507
|
-
return { merged, conflicts, unbuildable, version, deployed: false, stopped: "build failed", decision };
|
|
6528
|
+
return { merged, conflicts, unbuildable, version, deployed: false, stopped: "build failed", decision, hookFailure: hookFailure(o, "build", r.output) };
|
|
6508
6529
|
}
|
|
6509
6530
|
}
|
|
6510
6531
|
}
|
|
@@ -6534,7 +6555,7 @@ async function mergeAndRelease(o, decision, fresh, releaseBranch) {
|
|
|
6534
6555
|
if (r && r.code !== 0) {
|
|
6535
6556
|
o.emit.error(`deploy FAILED (exit ${r.code}) \u2014 the target may be partially deployed`);
|
|
6536
6557
|
o.state?.noteDeployFailed(headSha(o.cwd));
|
|
6537
|
-
return { merged, conflicts, unbuildable, version, deployed: false, stopped: "deploy failed", decision };
|
|
6558
|
+
return { merged, conflicts, unbuildable, version, deployed: false, stopped: "deploy failed", decision, hookFailure: hookFailure(o, "deploy", r.output) };
|
|
6538
6559
|
}
|
|
6539
6560
|
deployed = true;
|
|
6540
6561
|
o.state?.clearDeployFailed();
|
package/package.json
CHANGED