mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-08 12:57:46 +00:00
[tests] Add additional env vars (#3968)
These are used for testing and health checks.
This commit is contained in:
@@ -15,6 +15,7 @@ async function nowDeploy(bodies, randomness) {
|
||||
mode: path.extname(n) === '.sh' ? 0o100755 : 0o100644,
|
||||
}));
|
||||
|
||||
const { FORCE_BUILD_IN_REGION, NOW_DEBUG } = process.env;
|
||||
const nowJson = JSON.parse(bodies['now.json']);
|
||||
|
||||
const nowDeployPayload = {
|
||||
@@ -25,6 +26,8 @@ async function nowDeploy(bodies, randomness) {
|
||||
env: {
|
||||
...(nowJson.build || {}).env,
|
||||
RANDOMNESS_BUILD_ENV_VAR: randomness,
|
||||
FORCE_BUILD_IN_REGION,
|
||||
NOW_DEBUG,
|
||||
},
|
||||
},
|
||||
name: 'test2020',
|
||||
@@ -34,16 +37,6 @@ async function nowDeploy(bodies, randomness) {
|
||||
meta: {},
|
||||
};
|
||||
|
||||
if (process.env.FORCE_BUILD_IN_REGION) {
|
||||
const { builds = [] } = nowDeployPayload;
|
||||
builds.forEach(b => {
|
||||
if (!b.config) {
|
||||
b.config = {};
|
||||
}
|
||||
b.config.forceBuildIn = process.env.FORCE_BUILD_IN_REGION;
|
||||
});
|
||||
}
|
||||
|
||||
console.log(`posting ${files.length} files`);
|
||||
|
||||
for (const { file: filename } of files) {
|
||||
|
||||
Reference in New Issue
Block a user