[tests] Add env var FORCE_BUILD_IN_REGION (#3036)

* [tests] Add env var FORCE_BUILD_IN_REGION

* Add missing config
This commit is contained in:
Steven
2019-09-17 17:56:46 -04:00
parent 81279fd40b
commit 776f372eb3

View File

@@ -35,6 +35,16 @@ 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) {