[tests] Add additional env vars (#3968)

These are used for testing and health checks.
This commit is contained in:
Steven
2020-03-25 18:42:37 -04:00
committed by GitHub
parent 400a5c73e8
commit 7c51446e5e

View File

@@ -15,6 +15,7 @@ async function nowDeploy(bodies, randomness) {
mode: path.extname(n) === '.sh' ? 0o100755 : 0o100644, mode: path.extname(n) === '.sh' ? 0o100755 : 0o100644,
})); }));
const { FORCE_BUILD_IN_REGION, NOW_DEBUG } = process.env;
const nowJson = JSON.parse(bodies['now.json']); const nowJson = JSON.parse(bodies['now.json']);
const nowDeployPayload = { const nowDeployPayload = {
@@ -25,6 +26,8 @@ async function nowDeploy(bodies, randomness) {
env: { env: {
...(nowJson.build || {}).env, ...(nowJson.build || {}).env,
RANDOMNESS_BUILD_ENV_VAR: randomness, RANDOMNESS_BUILD_ENV_VAR: randomness,
FORCE_BUILD_IN_REGION,
NOW_DEBUG,
}, },
}, },
name: 'test2020', name: 'test2020',
@@ -34,16 +37,6 @@ async function nowDeploy(bodies, randomness) {
meta: {}, 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`); console.log(`posting ${files.length} files`);
for (const { file: filename } of files) { for (const { file: filename } of files) {