amsd-pipeline-workflow 0.1.16 → 0.1.17
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/driver/release-lines.js +13 -3
- package/package.json +1 -1
package/driver/release-lines.js
CHANGED
|
@@ -46,13 +46,13 @@ async function runReleaseLines(ctx, lane, clPrd, laneLog, laneEnv, canonical, ph
|
|
|
46
46
|
// A RESUMED LINE'S COMMITTED WORK IS NOT REWRITTEN (operator, 2026-10-20): its story completed by its commit, as a lane's is
|
|
47
47
|
if (env.EPAM_RESUME_RUN && fs.existsSync(linePrd)) {
|
|
48
48
|
const id = (JSON.parse(fs.readFileSync(linePrd, 'utf8')).stories[0] || {}).id;
|
|
49
|
-
if (id) completeLineByCommit(env, wt, lineLog, linePrd,
|
|
49
|
+
if (id) completeLineByCommit(env, wt, lineLog, linePrd, lineBranch(env, id, slug), log);
|
|
50
50
|
}
|
|
51
51
|
const done = lineIsDone(linePrd);
|
|
52
52
|
if (bash(env, 'resume_preserves', ['completed-stories']).status === 0 && done
|
|
53
53
|
&& !handler(env, 'spec-predates-plan', [linePrd, canonical || clPrd]).stdout.trim()) { // :96–106
|
|
54
54
|
rerun = [];
|
|
55
|
-
const lb =
|
|
55
|
+
const lb = lineBranch(env, JSON.parse(fs.readFileSync(linePrd, 'utf8')).stories[0].id, slug);
|
|
56
56
|
if (git(wt, 'checkout', '-q', lb).status !== 0) log(`[orch] Codeline '${cl}': could not check out ${lb} for its review`);
|
|
57
57
|
handler(env, 'carry-plan', [linePrd, canonical || clPrd], { log });
|
|
58
58
|
log(`[orch] Codeline '${cl}' — release line ${line} completed in this run — its reviewer judges it again against the story's plan`);
|
|
@@ -94,6 +94,16 @@ async function runReleaseLines(ctx, lane, clPrd, laneLog, laneEnv, canonical, ph
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* A RELEASE LINE'S BRANCH NAME — the shared run-state core's ONE rule (story_branch_name, lib/git-ops.sh; backlog B75, finding RS-10), asked of the install's own
|
|
99
|
+
* function: the driver keeps no second copy of the rule. An install that predates it is said, loudly.
|
|
100
|
+
*/
|
|
101
|
+
function lineBranch(env, id, slug) {
|
|
102
|
+
const r = bash(env, 'story_branch_name', [id, `-${slug}`]);
|
|
103
|
+
if (r.status !== 0 || !r.stdout.trim()) throw new Error(`the install's lib/git-ops.sh has no story_branch_name (exit ${r.status}) — it needs amsd-pipeline-shared >= 0.5.2 (amsd-pipeline-shared install --into <install>)`);
|
|
104
|
+
return r.stdout.trim();
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
/**
|
|
98
108
|
* A RESUMED RELEASE LINE (LIVE-AMSD-2974-11): the line's branch checked out and the pipeline's own
|
|
99
109
|
* story_resume_completed_by_commit run on the line's log and PRD. The pipeline applies it to lanes only, so a line whose
|
|
@@ -120,4 +130,4 @@ function lineIsDone(linePrd) {
|
|
|
120
130
|
return (p.stories || []).length > 0 && p.stories.every((s) => s.status === 'completed');
|
|
121
131
|
}
|
|
122
132
|
|
|
123
|
-
module.exports = { runReleaseLines, completeLineByCommit, lineIsDone };
|
|
133
|
+
module.exports = { runReleaseLines, completeLineByCommit, lineIsDone, lineBranch };
|
package/package.json
CHANGED