@empire-builder-kit/nx 1.0.0-rc.33 → 1.0.0-rc.35
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/package.json +3 -3
- package/src/aws-authority/stage-authority.js +4 -0
- package/src/aws-authority/stage-authority.js.map +1 -1
- package/src/executors/deployment-plan/deployment-plan.js +3 -0
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/local-deploy/local-deploy.d.ts +12 -3
- package/src/executors/local-deploy/local-deploy.js +156 -0
- package/src/executors/local-deploy/local-deploy.js.map +1 -1
- package/src/executors/local-deploy/schema.json +21 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +13 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +323 -137
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
- package/src/executors/router-waf-rehearsal/schema.json +5 -0
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +14 -1
- package/src/generators/preset/workspace-files-thin-deploy.js +897 -28
- package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -1
- package/src/generators/preset/workspace-files-thin-docs.d.ts +2 -0
- package/src/generators/preset/workspace-files-thin-docs.js +51 -6
- package/src/generators/preset/workspace-files-thin-docs.js.map +1 -1
- package/src/generators/preset/workspace-files.d.ts +7 -1
- package/src/generators/preset/workspace-files.js +80 -18
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +1 -0
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/repository-policy/schema.d.ts +2 -0
- package/src/generators/repository-policy/schema.json +26 -6
- package/src/generators/slice/built-in-plan-infrastructure-files.js +12 -0
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
- package/src/generators/upgrade/upgrade.d.ts +12 -0
- package/src/generators/upgrade/upgrade.js +68 -0
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/git-policy/action-pins.d.ts +5 -0
- package/src/git-policy/action-pins.js +5 -0
- package/src/git-policy/action-pins.js.map +1 -1
- package/src/git-policy/github-bootstrap.d.ts +10 -2
- package/src/git-policy/github-bootstrap.js +129 -34
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/git-policy/routing.d.ts +5 -1
- package/src/git-policy/routing.js +50 -0
- package/src/git-policy/routing.js.map +1 -1
- package/src/repository-policy/policy.d.ts +12 -1
- package/src/repository-policy/policy.js +42 -2
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/repository-policy-v1.json +55 -16
- package/src/supply-chain/generated-container-release-command.js +281 -74
- package/src/supply-chain/generated-container-release-command.js.map +1 -1
- package/src/supply-chain/generated-files.js +10 -11
- package/src/supply-chain/generated-files.js.map +1 -1
- package/src/workspace-deployment/affected-lifecycle.d.ts +53 -0
- package/src/workspace-deployment/affected-lifecycle.js +84 -0
- package/src/workspace-deployment/affected-lifecycle.js.map +1 -0
- package/src/workspace-deployment/index.d.ts +1 -0
- package/src/workspace-deployment/index.js +1 -0
- package/src/workspace-deployment/index.js.map +1 -1
|
@@ -121,6 +121,7 @@ function renderContainerReleaseCommand(options = {}) {
|
|
|
121
121
|
import { execFileSync, spawn, spawnSync } from 'node:child_process';
|
|
122
122
|
import {
|
|
123
123
|
chmodSync,
|
|
124
|
+
copyFileSync,
|
|
124
125
|
existsSync,
|
|
125
126
|
lstatSync,
|
|
126
127
|
mkdirSync,
|
|
@@ -128,6 +129,7 @@ import {
|
|
|
128
129
|
readFileSync,
|
|
129
130
|
realpathSync,
|
|
130
131
|
readdirSync,
|
|
132
|
+
renameSync,
|
|
131
133
|
rmSync,
|
|
132
134
|
unlinkSync,
|
|
133
135
|
writeFileSync,
|
|
@@ -167,6 +169,39 @@ const AWS_REGION_NAME =
|
|
|
167
169
|
/^(?=.{9,32}$)[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-\\d$/;
|
|
168
170
|
const MAX_TOOL_BYTES = 100 * 1024 * 1024;
|
|
169
171
|
const MAX_OUTPUT_BYTES = 64 * 1024 * 1024;
|
|
172
|
+
// Optional absolute cache roots supplied by the workflow (runner-local, restored
|
|
173
|
+
// by the managed cache step). Absent or relative values disable the caches.
|
|
174
|
+
const optionalCacheRoot = (name) => {
|
|
175
|
+
const value = process.env[name]?.trim() ?? '';
|
|
176
|
+
return value !== '' && isAbsolute(value) && !value.includes('..') ? value : '';
|
|
177
|
+
};
|
|
178
|
+
const buildxLayerCache = (repositoryName, architecture) => {
|
|
179
|
+
const root = optionalCacheRoot('EBK_BUILDX_CACHE_DIR');
|
|
180
|
+
if (root === '') return { arguments: [], commit: () => {} };
|
|
181
|
+
const scope = repositoryName.replaceAll('/', '-') + '-' + architecture;
|
|
182
|
+
const current = join(root, scope);
|
|
183
|
+
const next = join(root, scope + '.next');
|
|
184
|
+
mkdirSync(root, { mode: 0o700, recursive: true });
|
|
185
|
+
rmSync(next, { force: true, recursive: true });
|
|
186
|
+
return {
|
|
187
|
+
arguments: [
|
|
188
|
+
...(existsSync(current)
|
|
189
|
+
? ['--cache-from', 'type=local,src=' + current]
|
|
190
|
+
: []),
|
|
191
|
+
'--cache-to',
|
|
192
|
+
'type=local,dest=' + next + ',mode=max',
|
|
193
|
+
],
|
|
194
|
+
commit: () => {
|
|
195
|
+
if (!existsSync(next)) return;
|
|
196
|
+
rmSync(current, { force: true, recursive: true });
|
|
197
|
+
renameSync(next, current);
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
const cachedReleaseToolArchive = (name, sha256) => {
|
|
202
|
+
const root = optionalCacheRoot('EBK_RELEASE_TOOL_CACHE_DIR');
|
|
203
|
+
return root === '' ? '' : join(root, name + '-' + sha256);
|
|
204
|
+
};
|
|
170
205
|
const mode = process.argv[2];
|
|
171
206
|
const requestedPlatform = process.argv[3];
|
|
172
207
|
if (
|
|
@@ -1213,10 +1248,17 @@ const releaseContainerInputs = declaredContainers.map((declared, index) => {
|
|
|
1213
1248
|
? captured.digest
|
|
1214
1249
|
: captured?.candidateDigest;
|
|
1215
1250
|
const candidate = declared.candidate;
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
)
|
|
1251
|
+
// Promotion copies reviewed staging images without rebuilding, so the build
|
|
1252
|
+
// material is never present in that job; the candidate evidence restored
|
|
1253
|
+
// from the exact release artifact already binds the material digest
|
|
1254
|
+
// (EBK-INT-2026-076).
|
|
1255
|
+
const materialDigest =
|
|
1256
|
+
mode === 'promote'
|
|
1257
|
+
? candidateArtifactDigest
|
|
1258
|
+
: digestCandidatePaths(
|
|
1259
|
+
candidate.materialPaths,
|
|
1260
|
+
'OCI artifact candidate material',
|
|
1261
|
+
);
|
|
1220
1262
|
const buildRecipeDigest = digestCandidatePaths(
|
|
1221
1263
|
candidate.recipePaths,
|
|
1222
1264
|
'OCI artifact candidate recipe',
|
|
@@ -1493,6 +1535,114 @@ const exactImageByTag = (repositoryName, tag) => {
|
|
|
1493
1535
|
}
|
|
1494
1536
|
return response.imageDetails[0].imageDigest;
|
|
1495
1537
|
};
|
|
1538
|
+
const exactImageByDigest = (repositoryName, imageDigest) => {
|
|
1539
|
+
const response = awsJson(
|
|
1540
|
+
[
|
|
1541
|
+
'ecr',
|
|
1542
|
+
'describe-images',
|
|
1543
|
+
'--registry-id',
|
|
1544
|
+
accountId,
|
|
1545
|
+
'--repository-name',
|
|
1546
|
+
repositoryName,
|
|
1547
|
+
'--image-ids',
|
|
1548
|
+
'imageDigest=' + imageDigest,
|
|
1549
|
+
'--region',
|
|
1550
|
+
region,
|
|
1551
|
+
'--output',
|
|
1552
|
+
'json',
|
|
1553
|
+
],
|
|
1554
|
+
'Exact ECR image digest lookup',
|
|
1555
|
+
);
|
|
1556
|
+
return (
|
|
1557
|
+
Array.isArray(response?.imageDetails) &&
|
|
1558
|
+
response.imageDetails.length === 1 &&
|
|
1559
|
+
response.imageDetails[0]?.registryId === accountId &&
|
|
1560
|
+
response.imageDetails[0]?.repositoryName === repositoryName &&
|
|
1561
|
+
response.imageDetails[0]?.imageDigest === imageDigest
|
|
1562
|
+
);
|
|
1563
|
+
};
|
|
1564
|
+
// An unchanged artifact (same candidate material, recipe, Dockerfile, platform,
|
|
1565
|
+
// and production closure) may reuse the image and SBOM retained by the newest
|
|
1566
|
+
// successful deployment on this branch instead of rebuilding. Declining reuse
|
|
1567
|
+
// is always safe: the full native build runs. The native run proof is always
|
|
1568
|
+
// re-executed against the reused image.
|
|
1569
|
+
const reusableBaselinePlatformRecord = (input, requestedPlatform, architecture, repositoryName, expectedClosure) => {
|
|
1570
|
+
const root = optionalCacheRoot('EBK_CONTAINER_BASELINE_ROOT');
|
|
1571
|
+
if (root === '' || process.env.EBK_OCI_REBUILD?.trim() === 'all') return undefined;
|
|
1572
|
+
const safeArtifact = input.declared.name.replace(/[^A-Za-z0-9._-]/g, '_');
|
|
1573
|
+
const recordPath = join(
|
|
1574
|
+
root,
|
|
1575
|
+
'container-release',
|
|
1576
|
+
'partials',
|
|
1577
|
+
stage,
|
|
1578
|
+
slice,
|
|
1579
|
+
architecture,
|
|
1580
|
+
safeArtifact + '.platform.json',
|
|
1581
|
+
);
|
|
1582
|
+
const decline = (reason) => {
|
|
1583
|
+
process.stderr.write(
|
|
1584
|
+
'ebk-container-release-reuse ' +
|
|
1585
|
+
JSON.stringify({ artifact: input.declared.id, platform: requestedPlatform, reason, reused: false }) +
|
|
1586
|
+
'\\n',
|
|
1587
|
+
);
|
|
1588
|
+
return undefined;
|
|
1589
|
+
};
|
|
1590
|
+
if (!existsSync(recordPath) || lstatSync(recordPath).isSymbolicLink()) {
|
|
1591
|
+
return decline('no baseline platform record');
|
|
1592
|
+
}
|
|
1593
|
+
let record;
|
|
1594
|
+
try {
|
|
1595
|
+
record = validateContainerPlatformEvidence(JSON.parse(readFileSync(recordPath, 'utf8')));
|
|
1596
|
+
} catch (error) {
|
|
1597
|
+
return decline('baseline platform record is invalid: ' + String(error?.message ?? error));
|
|
1598
|
+
}
|
|
1599
|
+
if (
|
|
1600
|
+
record.accountId !== accountId ||
|
|
1601
|
+
record.region !== region ||
|
|
1602
|
+
record.stage !== stage ||
|
|
1603
|
+
record.slice !== slice ||
|
|
1604
|
+
record.artifactId !== input.declared.id ||
|
|
1605
|
+
record.artifactName !== input.declared.name ||
|
|
1606
|
+
record.platform !== requestedPlatform ||
|
|
1607
|
+
record.repositoryName !== repositoryName ||
|
|
1608
|
+
record.candidateArtifactDigest !== input.candidateArtifactDigest ||
|
|
1609
|
+
record.dockerfileDigest !== digestBytes(readFileSync(input.dockerfile)) ||
|
|
1610
|
+
record.productionClosureDigest !== expectedClosure.digest ||
|
|
1611
|
+
!IMAGE_DIGEST.test(record.imageDigest) ||
|
|
1612
|
+
record.imageReference !== registry + '/' + repositoryName + '@' + record.imageDigest
|
|
1613
|
+
) {
|
|
1614
|
+
return decline('artifact inputs changed since the baseline');
|
|
1615
|
+
}
|
|
1616
|
+
const evidencePrefix = '.ebk/evidence/';
|
|
1617
|
+
const sbomPath = join(
|
|
1618
|
+
root,
|
|
1619
|
+
record.sbom.path.startsWith(evidencePrefix)
|
|
1620
|
+
? record.sbom.path.slice(evidencePrefix.length)
|
|
1621
|
+
: record.sbom.path,
|
|
1622
|
+
);
|
|
1623
|
+
if (!existsSync(sbomPath) || lstatSync(sbomPath).isSymbolicLink()) {
|
|
1624
|
+
return decline('baseline SBOM is absent');
|
|
1625
|
+
}
|
|
1626
|
+
const sbomBytes = readFileSync(sbomPath);
|
|
1627
|
+
if (digestBytes(sbomBytes) !== record.sbom.sha256) {
|
|
1628
|
+
return decline('baseline SBOM bytes differ from the retained record');
|
|
1629
|
+
}
|
|
1630
|
+
if (!exactImageByDigest(repositoryName, record.imageDigest)) {
|
|
1631
|
+
return decline('baseline image is no longer in the registry');
|
|
1632
|
+
}
|
|
1633
|
+
process.stderr.write(
|
|
1634
|
+
'ebk-container-release-reuse ' +
|
|
1635
|
+
JSON.stringify({
|
|
1636
|
+
artifact: input.declared.id,
|
|
1637
|
+
baselineCommit: record.sourceCommit,
|
|
1638
|
+
imageDigest: record.imageDigest,
|
|
1639
|
+
platform: requestedPlatform,
|
|
1640
|
+
reused: true,
|
|
1641
|
+
}) +
|
|
1642
|
+
'\\n',
|
|
1643
|
+
);
|
|
1644
|
+
return { imageDigest: record.imageDigest, sbomBytes };
|
|
1645
|
+
};
|
|
1496
1646
|
const acquireSyft = async () => {
|
|
1497
1647
|
const platformKey = process.platform + '-' + process.arch;
|
|
1498
1648
|
const release = SYFT_RELEASES[platformKey];
|
|
@@ -1505,7 +1655,12 @@ const acquireSyft = async () => {
|
|
|
1505
1655
|
const archive = supplied
|
|
1506
1656
|
? safePath(relative(repositoryRoot, resolve(repositoryRoot, supplied)), 'Supplied Syft archive')
|
|
1507
1657
|
: join(temporary, 'syft-archive');
|
|
1508
|
-
|
|
1658
|
+
const cachedArchive = supplied ? '' : cachedReleaseToolArchive('syft', release.sha256);
|
|
1659
|
+
if (!supplied && cachedArchive && existsSync(cachedArchive)) {
|
|
1660
|
+
// Reuse the archive verified by an earlier invocation on this runner; the
|
|
1661
|
+
// digest check below still runs against the copied bytes.
|
|
1662
|
+
copyFileSync(cachedArchive, archive);
|
|
1663
|
+
} else if (!supplied) {
|
|
1509
1664
|
const response = await fetch(release.source, {
|
|
1510
1665
|
redirect: 'follow',
|
|
1511
1666
|
signal: AbortSignal.timeout(120_000),
|
|
@@ -1530,6 +1685,10 @@ const acquireSyft = async () => {
|
|
|
1530
1685
|
) {
|
|
1531
1686
|
throw new Error('Pinned Syft archive integrity does not match policy.');
|
|
1532
1687
|
}
|
|
1688
|
+
if (cachedArchive && !existsSync(cachedArchive)) {
|
|
1689
|
+
mkdirSync(optionalCacheRoot('EBK_RELEASE_TOOL_CACHE_DIR'), { mode: 0o700, recursive: true });
|
|
1690
|
+
writeFileSync(cachedArchive, bytes, { mode: 0o600 });
|
|
1691
|
+
}
|
|
1533
1692
|
const path = join(temporary, 'syft');
|
|
1534
1693
|
if (release.archiveFormat === 'binary') {
|
|
1535
1694
|
writeFileSync(path, bytes, { mode: 0o700 });
|
|
@@ -1574,7 +1733,10 @@ const acquireCrane = async () => {
|
|
|
1574
1733
|
'Supplied Crane archive',
|
|
1575
1734
|
)
|
|
1576
1735
|
: join(temporary, 'crane-archive.tar.gz');
|
|
1577
|
-
|
|
1736
|
+
const cachedArchive = supplied ? '' : cachedReleaseToolArchive('crane', release.sha256);
|
|
1737
|
+
if (!supplied && cachedArchive && existsSync(cachedArchive)) {
|
|
1738
|
+
copyFileSync(cachedArchive, archive);
|
|
1739
|
+
} else if (!supplied) {
|
|
1578
1740
|
const response = await fetch(release.source, {
|
|
1579
1741
|
redirect: 'follow',
|
|
1580
1742
|
signal: AbortSignal.timeout(120_000),
|
|
@@ -1599,6 +1761,10 @@ const acquireCrane = async () => {
|
|
|
1599
1761
|
) {
|
|
1600
1762
|
throw new Error('Pinned Crane archive integrity does not match policy.');
|
|
1601
1763
|
}
|
|
1764
|
+
if (cachedArchive && !existsSync(cachedArchive)) {
|
|
1765
|
+
mkdirSync(optionalCacheRoot('EBK_RELEASE_TOOL_CACHE_DIR'), { mode: 0o700, recursive: true });
|
|
1766
|
+
writeFileSync(cachedArchive, bytes, { mode: 0o600 });
|
|
1767
|
+
}
|
|
1602
1768
|
execute('tar', ['-xzf', archive, '-C', temporary, 'crane'], 'Crane extraction');
|
|
1603
1769
|
const path = join(temporary, 'crane');
|
|
1604
1770
|
chmodSync(path, 0o700);
|
|
@@ -2516,14 +2682,29 @@ if (mode === 'platform') {
|
|
|
2516
2682
|
let platformError;
|
|
2517
2683
|
try {
|
|
2518
2684
|
syft = await acquireSyft();
|
|
2519
|
-
crane =
|
|
2685
|
+
crane =
|
|
2686
|
+
stage === 'development' || optionalCacheRoot('EBK_CONTAINER_BASELINE_ROOT') !== ''
|
|
2687
|
+
? await acquireCrane()
|
|
2688
|
+
: undefined;
|
|
2520
2689
|
recoverReleaseBuilders();
|
|
2690
|
+
// Artifacts that share a package, recipe, and Dockerfile (the migration and
|
|
2691
|
+
// retirement jobs) resolve one identical production closure.
|
|
2521
2692
|
const expectedClosures = new Map();
|
|
2693
|
+
const closuresByRecipe = new Map();
|
|
2522
2694
|
for (const input of containerInputs) {
|
|
2523
|
-
|
|
2524
|
-
input.
|
|
2525
|
-
|
|
2526
|
-
|
|
2695
|
+
const recipeKey =
|
|
2696
|
+
input.packageName +
|
|
2697
|
+
':' +
|
|
2698
|
+
input.buildRecipeDigest +
|
|
2699
|
+
':' +
|
|
2700
|
+
digestBytes(readFileSync(input.dockerfile));
|
|
2701
|
+
if (!closuresByRecipe.has(recipeKey)) {
|
|
2702
|
+
closuresByRecipe.set(
|
|
2703
|
+
recipeKey,
|
|
2704
|
+
await deriveExpectedProductionClosure(syft, input),
|
|
2705
|
+
);
|
|
2706
|
+
}
|
|
2707
|
+
expectedClosures.set(input.declared.id, closuresByRecipe.get(recipeKey));
|
|
2527
2708
|
}
|
|
2528
2709
|
requireReviewedCheckout();
|
|
2529
2710
|
for (const input of containerInputs) requireCandidateAuthority(input);
|
|
@@ -2555,7 +2736,24 @@ if (mode === 'platform') {
|
|
|
2555
2736
|
({ platform }) => platform === requestedPlatform,
|
|
2556
2737
|
)
|
|
2557
2738
|
: undefined;
|
|
2558
|
-
|
|
2739
|
+
const reusable =
|
|
2740
|
+
stage === 'development'
|
|
2741
|
+
? undefined
|
|
2742
|
+
: reusableBaselinePlatformRecord(
|
|
2743
|
+
input,
|
|
2744
|
+
requestedPlatform,
|
|
2745
|
+
architecture,
|
|
2746
|
+
repositoryName,
|
|
2747
|
+
expectedClosure,
|
|
2748
|
+
);
|
|
2749
|
+
if (reusable) {
|
|
2750
|
+
if (!crane) throw new Error('Unchanged artifact reuse requires the reviewed crane.');
|
|
2751
|
+
execute(
|
|
2752
|
+
crane.path,
|
|
2753
|
+
['copy', registry + '/' + repositoryName + '@' + reusable.imageDigest, taggedReference],
|
|
2754
|
+
'Unchanged artifact re-tag without rebuilding',
|
|
2755
|
+
);
|
|
2756
|
+
} else if (stage === 'development') {
|
|
2559
2757
|
if (!crane || !developmentSourcePlatform) {
|
|
2560
2758
|
throw new Error(
|
|
2561
2759
|
'Development retirement source platform is absent.',
|
|
@@ -2567,41 +2765,46 @@ if (mode === 'platform') {
|
|
|
2567
2765
|
'Exact staging retirement child promotion',
|
|
2568
2766
|
);
|
|
2569
2767
|
} else {
|
|
2768
|
+
// One BuildKit builder serves every artifact of this invocation so
|
|
2769
|
+
// shared layers (pnpm fetch, filtered install) are reused across the
|
|
2770
|
+
// Slice's images; the platform-mode finally block removes it.
|
|
2570
2771
|
const platformBuilder = ensureReleaseBuilder();
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
}
|
|
2772
|
+
const layerCache = buildxLayerCache(repositoryName, architecture);
|
|
2773
|
+
await executeObservedBuildx([
|
|
2774
|
+
'buildx',
|
|
2775
|
+
'build',
|
|
2776
|
+
'--builder',
|
|
2777
|
+
platformBuilder.name,
|
|
2778
|
+
...(packageRegistry
|
|
2779
|
+
? [
|
|
2780
|
+
'--build-arg',
|
|
2781
|
+
'NPM_CONFIG_REGISTRY=' + packageRegistry,
|
|
2782
|
+
]
|
|
2783
|
+
: []),
|
|
2784
|
+
...layerCache.arguments,
|
|
2785
|
+
'--file',
|
|
2786
|
+
relative(repositoryRoot, input.dockerfile),
|
|
2787
|
+
'--label',
|
|
2788
|
+
'org.opencontainers.image.revision=' + sourceCommit,
|
|
2789
|
+
'--label',
|
|
2790
|
+
'dev.empire-builder-kit.candidate-digest=' +
|
|
2791
|
+
input.candidateArtifactDigest,
|
|
2792
|
+
'--platform',
|
|
2793
|
+
requestedPlatform,
|
|
2794
|
+
'--provenance=false',
|
|
2795
|
+
'--push',
|
|
2796
|
+
'--sbom=false',
|
|
2797
|
+
'--tag',
|
|
2798
|
+
taggedReference,
|
|
2799
|
+
relative(repositoryRoot, input.context) || '.',
|
|
2800
|
+
], 'Native container build and push');
|
|
2801
|
+
layerCache.commit();
|
|
2602
2802
|
}
|
|
2603
2803
|
const imageDigest = exactImageByTag(repositoryName, tag);
|
|
2604
2804
|
const imageReference = registry + '/' + repositoryName + '@' + imageDigest;
|
|
2805
|
+
if (reusable && reusable.imageDigest !== imageDigest) {
|
|
2806
|
+
throw new Error('Unchanged artifact re-tag differs from the baseline image.');
|
|
2807
|
+
}
|
|
2605
2808
|
if (
|
|
2606
2809
|
stage === 'development' &&
|
|
2607
2810
|
developmentSourcePlatform?.imageDigest !== imageDigest
|
|
@@ -2677,39 +2880,43 @@ if (mode === 'platform') {
|
|
|
2677
2880
|
resolve(repositoryRoot, relativeRunProofPath),
|
|
2678
2881
|
serializedRunProof,
|
|
2679
2882
|
);
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
let closureInventory;
|
|
2689
|
-
try {
|
|
2690
|
-
closureInventory = JSON.parse(closureRaw);
|
|
2691
|
-
} catch {
|
|
2692
|
-
throw new Error('Exact application npm closure inventory is invalid JSON.');
|
|
2693
|
-
}
|
|
2694
|
-
const observedClosure = npmClosureFor(closureInventory, {
|
|
2695
|
-
applicationOnly: true,
|
|
2696
|
-
});
|
|
2697
|
-
if (
|
|
2698
|
-
JSON.stringify(observedClosure) !==
|
|
2699
|
-
JSON.stringify(expectedClosure.packages)
|
|
2700
|
-
) {
|
|
2701
|
-
throw new Error(
|
|
2702
|
-
'Container application npm closure differs from the independently deployed production closure.',
|
|
2883
|
+
if (!reusable) {
|
|
2884
|
+
const closureRaw = String(
|
|
2885
|
+
execute(
|
|
2886
|
+
syft.path,
|
|
2887
|
+
['scan', 'registry:' + imageReference, '--output', 'syft-json'],
|
|
2888
|
+
'Exact application npm closure inventory',
|
|
2889
|
+
{ env: { SYFT_CHECK_FOR_APP_UPDATE: 'false' } },
|
|
2890
|
+
),
|
|
2703
2891
|
);
|
|
2892
|
+
let closureInventory;
|
|
2893
|
+
try {
|
|
2894
|
+
closureInventory = JSON.parse(closureRaw);
|
|
2895
|
+
} catch {
|
|
2896
|
+
throw new Error('Exact application npm closure inventory is invalid JSON.');
|
|
2897
|
+
}
|
|
2898
|
+
const observedClosure = npmClosureFor(closureInventory, {
|
|
2899
|
+
applicationOnly: true,
|
|
2900
|
+
});
|
|
2901
|
+
if (
|
|
2902
|
+
JSON.stringify(observedClosure) !==
|
|
2903
|
+
JSON.stringify(expectedClosure.packages)
|
|
2904
|
+
) {
|
|
2905
|
+
throw new Error(
|
|
2906
|
+
'Container application npm closure differs from the independently deployed production closure.',
|
|
2907
|
+
);
|
|
2908
|
+
}
|
|
2704
2909
|
}
|
|
2705
|
-
const rawSbom =
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2910
|
+
const rawSbom = reusable
|
|
2911
|
+
? reusable.sbomBytes.toString('utf8')
|
|
2912
|
+
: String(
|
|
2913
|
+
execute(
|
|
2914
|
+
syft.path,
|
|
2915
|
+
['scan', 'registry:' + imageReference, '--output', 'cyclonedx-json'],
|
|
2916
|
+
'Exact platform OCI SBOM',
|
|
2917
|
+
{ env: { SYFT_CHECK_FOR_APP_UPDATE: 'false' } },
|
|
2918
|
+
),
|
|
2919
|
+
);
|
|
2713
2920
|
let sbom;
|
|
2714
2921
|
try {
|
|
2715
2922
|
sbom = parseCycloneDx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-container-release-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-container-release-command.ts"],"names":[],"mappings":";;;AAwJA,
|
|
1
|
+
{"version":3,"file":"generated-container-release-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-container-release-command.ts"],"names":[],"mappings":";;;AAwJA,sEAslGC;AA9uGD,6FAI8C;AAC9C,+EAAwF;AAE3E,QAAA,aAAa,GAAG,QAAiB,CAAC;AAE/C,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B5C,CAAC;AAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B5C,CAAC;AAQW,QAAA,cAAc,GACzB,MAAM,CAAC,MAAM,CAAC;IACZ,cAAc,EAAE;QACd,aAAa,EAAE,UAAU;QACzB,MAAM,EACJ,kEAAkE;QACpE,MAAM,EACJ,mHAAmH;KACtH;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,UAAU;QACzB,MAAM,EACJ,kEAAkE;QACpE,MAAM,EACJ,oHAAoH;KACvH;IACD,aAAa,EAAE;QACb,aAAa,EAAE,UAAU;QACzB,MAAM,EACJ,kEAAkE;QACpE,MAAM,EACJ,kHAAkH;KACrH;IACD,WAAW,EAAE;QACX,aAAa,EAAE,UAAU;QACzB,MAAM,EACJ,kEAAkE;QACpE,MAAM,EACJ,mHAAmH;KACtH;CACF,CAAC,CAAC;AAEL,SAAS,iBAAiB,CACxB,QAAwD;IAExD,IACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC;QAClC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAygG1E,CAAC;AACF,CAAC"}
|
|
@@ -78,17 +78,16 @@ function frameworkActionPinInventory() {
|
|
|
78
78
|
key,
|
|
79
79
|
{
|
|
80
80
|
...pin,
|
|
81
|
-
scope:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
: 'consumer',
|
|
81
|
+
scope: [
|
|
82
|
+
'checkout',
|
|
83
|
+
'downloadArtifact',
|
|
84
|
+
'nxSetShas',
|
|
85
|
+
'pnpmSetup',
|
|
86
|
+
'setupNode',
|
|
87
|
+
'uploadArtifact',
|
|
88
|
+
].includes(key)
|
|
89
|
+
? 'both'
|
|
90
|
+
: 'consumer',
|
|
92
91
|
},
|
|
93
92
|
])),
|
|
94
93
|
containers: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-files.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-files.ts"],"names":[],"mappings":";;;AAgDA,8EAmDC;AAMD,
|
|
1
|
+
{"version":3,"file":"generated-files.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-files.ts"],"names":[],"mappings":";;;AAgDA,8EAmDC;AAMD,kEAuBC;AAED,0EA+TC;AAjcD,sEAAyD;AAEzD,iEAAkE;AAClE,qDAG0B;AAE1B,6DAM8B;AAC9B,iGAGgD;AAChD,iEAAuE;AACvE,6FAI8C;AAC9C,qGAGkD;AAClD,iFAAiF;AACjF,2CAAiE;AACjE,6CAAyE;AAQ5D,QAAA,iCAAiC,GAAG;IAC/C,WAAW;IACX,SAAS;IACT,IAAI;IACJ,YAAY;IACZ,OAAO;IACP,eAAe;CACP,CAAC;AAEX,SAAgB,iCAAiC;IAC/C,OAAO;QACL;YACE,UAAU,EAAE,0BAA0B;YACtC,KAAK,EAAE,2CAA2C;YAClD,OAAO,EAAE,WAAW;YACpB,SAAS,EACP,uEAAuE;YACzE,QAAQ,EAAE,2CAA2C;SACtD;QACD;YACE,UAAU,EAAE,0BAA0B;YACtC,KAAK,EAAE,2CAA2C;YAClD,OAAO,EAAE,SAAS;YAClB,SAAS,EACP,kGAAkG;YACpG,QAAQ,EAAE,2CAA2C;SACtD;QACD;YACE,UAAU,EAAE,0BAA0B;YACtC,KAAK,EAAE,2CAA2C;YAClD,OAAO,EAAE,IAAI;YACb,SAAS,EACP,6EAA6E;YAC/E,QAAQ,EAAE,2CAA2C;SACtD;QACD;YACE,UAAU,EAAE,0BAA0B;YACtC,KAAK,EAAE,2CAA2C;YAClD,OAAO,EAAE,YAAY;YACrB,SAAS,EACP,kIAAkI;YACpI,QAAQ,EAAE,uCAAuC;SAClD;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1C,4CAA4C;YAC5C,qCAAqC;YACrC,8BAA8B;YAC9B,kCAAkC;YAClC,oCAAoC;YACpC,wCAAwC;SACzC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Affected-only native lifecycle selection.
|
|
3
|
+
*
|
|
4
|
+
* A protected deployment may skip Product Slices whose inputs have not changed
|
|
5
|
+
* since the newest successful deployment receipt on the same branch. Declining
|
|
6
|
+
* is always safe: every rule below that cannot prove a project unchanged
|
|
7
|
+
* deploys it, and any governing change (policy, Nx configuration, Foundation
|
|
8
|
+
* contract, framework version) deploys everything.
|
|
9
|
+
*/
|
|
10
|
+
export type LifecycleMode = 'affected' | 'full';
|
|
11
|
+
export type LifecycleProjectDecision = 'deploy' | 'skip-unchanged';
|
|
12
|
+
export interface LifecycleBaseline {
|
|
13
|
+
readonly commit: string;
|
|
14
|
+
readonly runAttempt: string;
|
|
15
|
+
readonly runId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface LifecycleBaselineReceipt {
|
|
18
|
+
readonly children: readonly {
|
|
19
|
+
readonly outcome: string;
|
|
20
|
+
readonly project: string;
|
|
21
|
+
readonly target: string;
|
|
22
|
+
}[];
|
|
23
|
+
readonly frameworkVersion: string;
|
|
24
|
+
readonly outcome: string;
|
|
25
|
+
readonly source: {
|
|
26
|
+
readonly commit: string;
|
|
27
|
+
};
|
|
28
|
+
readonly stage: string;
|
|
29
|
+
}
|
|
30
|
+
export interface LifecycleScope {
|
|
31
|
+
readonly baseline: LifecycleBaseline | null;
|
|
32
|
+
readonly mode: LifecycleMode;
|
|
33
|
+
readonly projects: Readonly<Record<string, LifecycleProjectDecision>>;
|
|
34
|
+
readonly reason: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SelectLifecycleScopeInput {
|
|
37
|
+
/** Projects affected between the baseline commit and the source commit, or
|
|
38
|
+
* null when the affected set could not be computed. */
|
|
39
|
+
readonly affectedProjects: readonly string[] | null;
|
|
40
|
+
readonly baseline: (LifecycleBaseline & {
|
|
41
|
+
readonly receipt: LifecycleBaselineReceipt;
|
|
42
|
+
}) | null;
|
|
43
|
+
/** Governing files changed since the baseline (policy, Nx configuration,
|
|
44
|
+
* Foundation contract). Any entry forces the full lifecycle. */
|
|
45
|
+
readonly changedGoverningFiles: readonly string[];
|
|
46
|
+
readonly frameworkVersion: string;
|
|
47
|
+
readonly orderedProjects: readonly string[];
|
|
48
|
+
readonly requestedMode: LifecycleMode;
|
|
49
|
+
readonly stage: string;
|
|
50
|
+
}
|
|
51
|
+
/** Repository-relative files whose change always forces the full lifecycle. */
|
|
52
|
+
export declare const LIFECYCLE_GOVERNING_FILES: readonly string[];
|
|
53
|
+
export declare function selectLifecycleScope(input: SelectLifecycleScopeInput): LifecycleScope;
|