@kungfu-tech/buildchain 2.11.0 → 2.11.1-alpha.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.
@@ -272,11 +272,27 @@ export {
272
272
  BUILDCHAIN_CONTRACT_LOCK_PATH,
273
273
  BUILDCHAIN_DIR,
274
274
  BUILDCHAIN_GENERATED_DIRS,
275
+ BUILDCHAIN_KFD_ROOT,
276
+ BUILDCHAIN_KFD1_CONTRACT_WORLD_WITNESS_PATH,
277
+ BUILDCHAIN_KFD1_DIR,
278
+ BUILDCHAIN_KFD1_RELEASE_GATE_PATH,
279
+ BUILDCHAIN_KFD1_VERIFY_RESULT_PATH,
280
+ BUILDCHAIN_KFD2_CLAIMS_DIR,
281
+ BUILDCHAIN_KFD2_CLAIM_ARGS_PATH,
282
+ BUILDCHAIN_KFD2_DIR,
283
+ BUILDCHAIN_KFD2_RELEASE_CLAIMS_PATH,
284
+ BUILDCHAIN_KFD3_ARTIFACT_WITNESS_PATH,
285
+ BUILDCHAIN_KFD3_CAPABILITY_QUERY_PATH,
286
+ BUILDCHAIN_KFD3_COLLABORATION_INTERFACE_PATH,
287
+ BUILDCHAIN_KFD3_DIR,
288
+ BUILDCHAIN_KFD3_PREBUILD_WITNESS_PATH,
275
289
  BUILDCHAIN_KFD3_SURFACE_REGISTRY_PATH,
290
+ BUILDCHAIN_KFD4_DIR,
276
291
  BUILDCHAIN_RELEASE_PASSPORT_PATH,
277
292
  LEGACY_BUILDCHAIN_CONFIG_PATH,
278
293
  LEGACY_BUILDCHAIN_CONTRACT_LOCK_PATH,
279
294
  LEGACY_BUILDCHAIN_KFD3_SURFACE_REGISTRY_PATH,
295
+ LEGACY_BUILDCHAIN_KFD3_SURFACE_REGISTRY_PATHS,
280
296
  LEGACY_BUILDCHAIN_RELEASE_PASSPORT_PATH,
281
297
  discoverBuildchainRepoFiles,
282
298
  migrateBuildchainLayout,
@@ -87,6 +87,12 @@ const KFD_UPSTREAM_DEFAULT_EVIDENCE = Object.freeze([
87
87
  { kind: "package", path: "kfd.release.json", required: false },
88
88
  { kind: "package", path: "libnode.release.json", required: false },
89
89
  { kind: "package", path: "standards.json", required: false },
90
+ { kind: "package", path: ".buildchain/kfd/kfd-1/contract-world.witness.json", required: false },
91
+ { kind: "package", path: ".buildchain/kfd/kfd-2/release-claims.json", required: false },
92
+ { kind: "package", path: ".buildchain/kfd/kfd-2/claims", required: false },
93
+ { kind: "package", path: ".buildchain/kfd/kfd-3/collaboration-interface.json", required: false },
94
+ { kind: "package", path: ".buildchain/kfd/kfd-3/collaboration-interface.prebuild.json", required: false },
95
+ { kind: "package", path: ".buildchain/kfd/kfd-3/collaboration-interface.artifact.json", required: false },
90
96
  { kind: "package", path: ".buildchain/kfd-1/contract-world.witness.json", required: false },
91
97
  { kind: "package", path: ".buildchain/kfd-2/public-release-trust.claim.json", required: false },
92
98
  { kind: "package", path: ".buildchain/kfd-2/kfd-foundation.trust-claims.json", required: false },
@@ -7,7 +7,7 @@ export const KFD3_SURFACE_REGISTRY_CONTRACT = "kungfu-buildchain-kfd-3-surface-r
7
7
  export const KFD3_SURFACE_DETECTION_CONTRACT = "kungfu-buildchain-kfd-3-surface-detection";
8
8
  export const KFD3_SURFACE_AUDIT_CONTRACT = "kungfu-buildchain-kfd-3-surface-audit";
9
9
  export const KFD3_CAPABILITY_QUERY_CONTRACT = "kungfu-buildchain-kfd-3-capability-query";
10
- export const KFD3_DEFAULT_REGISTRY_PATH = ".buildchain/kfd/kfd-3-surfaces.json";
10
+ export const KFD3_DEFAULT_REGISTRY_PATH = ".buildchain/kfd/kfd-3/surfaces.json";
11
11
 
12
12
  const KIND_ALIASES = Object.freeze({
13
13
  "node-api": "node-api",
@@ -9,6 +9,12 @@ import {
9
9
  createBuildchainKfd3ArtifactWitness,
10
10
  createBuildchainKfd3PrebuildWitness,
11
11
  } from "../packages/core/buildchain-kfd-claims.js";
12
+ import {
13
+ BUILDCHAIN_KFD1_CONTRACT_WORLD_WITNESS_PATH,
14
+ BUILDCHAIN_KFD2_CLAIMS_DIR,
15
+ BUILDCHAIN_KFD3_ARTIFACT_WITNESS_PATH,
16
+ BUILDCHAIN_KFD3_PREBUILD_WITNESS_PATH,
17
+ } from "../packages/core/buildchain-layout.js";
12
18
  import { writeGitHubOutputs } from "./build-contract-core.mjs";
13
19
 
14
20
  function parseArgs(argv = process.argv.slice(2)) {
@@ -60,11 +66,12 @@ export function generateBuildchainKfdWitnesses({
60
66
  const root = path.resolve(cwd);
61
67
  const outDir = path.resolve(root, outputDir);
62
68
  const resolvedSourceSha = sourceSha || gitSha(root);
69
+ const outputPath = (canonicalPath) => path.join(outDir, path.relative(".buildchain/kfd", canonicalPath));
63
70
  const paths = {
64
- kfd1Witness: path.join(outDir, "buildchain-kfd-1-witness.json"),
65
- kfd3PrebuildWitness: path.join(outDir, "buildchain-kfd-3-prebuild-witness.json"),
66
- kfd3ArtifactWitness: path.join(outDir, "buildchain-kfd-3-artifact-witness.json"),
67
- kfd2ClaimsDir: path.join(outDir, "kfd-2-claims"),
71
+ kfd1Witness: outputPath(BUILDCHAIN_KFD1_CONTRACT_WORLD_WITNESS_PATH),
72
+ kfd3PrebuildWitness: outputPath(BUILDCHAIN_KFD3_PREBUILD_WITNESS_PATH),
73
+ kfd3ArtifactWitness: outputPath(BUILDCHAIN_KFD3_ARTIFACT_WITNESS_PATH),
74
+ kfd2ClaimsDir: outputPath(BUILDCHAIN_KFD2_CLAIMS_DIR),
68
75
  };
69
76
  writeJson(paths.kfd1Witness, createBuildchainKfd1Witness({ root, sourceSha: resolvedSourceSha }));
70
77
  writeJson(paths.kfd3PrebuildWitness, createBuildchainKfd3PrebuildWitness({ root, sourceSha: resolvedSourceSha }));
@@ -6,6 +6,9 @@ import { BUILDCHAIN_CONFIG_PATH } from "../packages/core/buildchain-layout.js";
6
6
  import { detectPackageManager, assertPackageManager } from "../packages/core/package-manager.js";
7
7
 
8
8
  const BUILDCHAIN_WORKFLOW_REF = "kungfu-systems/buildchain/.github/workflows/.build.yml@v2";
9
+ const DEFAULT_PUBLICATION_LATEX_IMAGE = "ghcr.io/kungfu-systems/build-images/latex-pdf-builder";
10
+ const DEFAULT_PUBLICATION_LATEX_DIGEST = "sha256:c20f3809e96836c1c78e97c76939d12f1de3fed0ea9b7c40c43332ec2ea480f8";
11
+ const DEFAULT_PUBLICATION_LATEX_COMMAND = "latexmk -pdf -outdir=_build paper/main.tex";
9
12
 
10
13
  function posixPath(value) {
11
14
  return String(value || "").split(path.sep).join("/");
@@ -259,8 +262,10 @@ manifest_path = ".buildchain/publication/publication-artifact.json"
259
262
  source_bundle_path = ".buildchain/publication/source.tar.gz"
260
263
 
261
264
  [publication.toolchain]
262
- type = "custom-command"
263
- command = "make pdf"
265
+ type = "latex-docker"
266
+ image = "${DEFAULT_PUBLICATION_LATEX_IMAGE}"
267
+ digest = "${DEFAULT_PUBLICATION_LATEX_DIGEST}"
268
+ command = "${DEFAULT_PUBLICATION_LATEX_COMMAND}"
264
269
 
265
270
  [lifecycle.build]
266
271
  command = "make pdf"