@faable/faable 1.15.4 → 1.16.0
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.
|
@@ -35,7 +35,15 @@ const node_buildpack = {
|
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
async build(ctx, plan) {
|
|
38
|
-
const env =
|
|
38
|
+
const env = {
|
|
39
|
+
...R.fromPairs(ctx.env_vars.map((e) => [e.name, e.value])),
|
|
40
|
+
// Platform-injected build-time identity, mirroring the runtime env the
|
|
41
|
+
// controller sets on the pod. FAABLE_DEPLOY_ID (build id ≡ runtime id)
|
|
42
|
+
// is the deterministic Next.js buildId source — user secrets can't
|
|
43
|
+
// override either. See arch/deploy/version-skew-coexistence.md.
|
|
44
|
+
FAABLE_APP_ID: ctx.app.id,
|
|
45
|
+
FAABLE_DEPLOY_ID: ctx.deployment.id,
|
|
46
|
+
};
|
|
39
47
|
log.info(`Building with env variables ${Object.keys(env).join(",")}`);
|
|
40
48
|
// The workflow no longer runs `npm ci` — install here when needed, before
|
|
41
49
|
// the build and before `COPY . .` packages node_modules into the image.
|
|
@@ -104,7 +104,7 @@ const deploy = {
|
|
|
104
104
|
.catch((error) => log.warn(`Could not mark deployment BUILDING: ${error.message}`));
|
|
105
105
|
const stop_log_sync = start_log_sync(api, deployment.id);
|
|
106
106
|
try {
|
|
107
|
-
await buildpack.build({ workdir, config, app, env_vars }, plan);
|
|
107
|
+
await buildpack.build({ workdir, config, app, env_vars, deployment }, plan);
|
|
108
108
|
// Upload to Faable registry, tagged by version and pinned to digest
|
|
109
109
|
const { image_ref } = await upload_tag({
|
|
110
110
|
app,
|