fix(deploy): isolate portal gate from fixture validation
This commit is contained in:
1 parent
362b984753
commit
4987f5ee1a
1 file changed
+16
-8
+16
-8
@@ -134,14 +134,22 @@ async function createSourceSnapshot(directory, sourceCommit) {
|
|||||||
await fs.rm(archive);
|
await fs.rm(archive);
|
||||||
return { snapshot, included: included.length, excluded };
|
return { snapshot, included: included.length, excluded };
|
||||||
}
|
}
|
||||||
async function executeBuild(env) {
|
function validationEnvironment() {
|
||||||
run('npm', ['run', 'check'], { env });
|
const env = { ...process.env };
|
||||||
run('node', ['--experimental-strip-types', '--test', 'tools/jotform-form-a.test.mjs', 'tools/service-portal.test.mjs', 'tools/phase10-artifact.test.mjs'], { env });
|
// Regression fixtures build their own publication modes. Do not let the
|
||||||
run('npm', ['run', 'test:publication'], { env });
|
// production-only portal payload gate leak into those isolated builds.
|
||||||
run('npm', ['run', 'audit:links'], { env });
|
for (const name of ['AIA_PORTAL_LOCAL_PREVIEW_APPROVED', 'AIA_PORTAL_PRODUCTION_APPROVED', 'AIA_PORTAL_CIPHERTEXT_FILE', 'AIA_PORTAL_PRODUCTION_CIPHERTEXT_FILE']) delete env[name];
|
||||||
run('npm', ['run', 'audit:images'], { env });
|
return env;
|
||||||
run('npm', ['run', 'audit:blog'], { env });
|
}
|
||||||
run('npm', ['run', 'build'], { env });
|
async function executeBuild(buildEnv) {
|
||||||
|
const testEnv = validationEnvironment();
|
||||||
|
run('npm', ['run', 'check'], { env: testEnv });
|
||||||
|
run('node', ['--experimental-strip-types', '--test', 'tools/jotform-form-a.test.mjs', 'tools/service-portal.test.mjs', 'tools/phase10-artifact.test.mjs'], { env: testEnv });
|
||||||
|
run('npm', ['run', 'test:publication'], { env: testEnv });
|
||||||
|
run('npm', ['run', 'audit:links'], { env: testEnv });
|
||||||
|
run('npm', ['run', 'audit:images'], { env: testEnv });
|
||||||
|
run('npm', ['run', 'audit:blog'], { env: buildEnv });
|
||||||
|
run('npm', ['run', 'build'], { env: buildEnv });
|
||||||
}
|
}
|
||||||
function parseArgs(argv) {
|
function parseArgs(argv) {
|
||||||
const allowed = new Set(['--dry-run', '--confirm']);
|
const allowed = new Set(['--dry-run', '--confirm']);
|
||||||
|
|||||||
Reference in new issue
Block a user