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);
|
||||
return { snapshot, included: included.length, excluded };
|
||||
}
|
||||
async function executeBuild(env) {
|
||||
run('npm', ['run', 'check'], { env });
|
||||
run('node', ['--experimental-strip-types', '--test', 'tools/jotform-form-a.test.mjs', 'tools/service-portal.test.mjs', 'tools/phase10-artifact.test.mjs'], { env });
|
||||
run('npm', ['run', 'test:publication'], { env });
|
||||
run('npm', ['run', 'audit:links'], { env });
|
||||
run('npm', ['run', 'audit:images'], { env });
|
||||
run('npm', ['run', 'audit:blog'], { env });
|
||||
run('npm', ['run', 'build'], { env });
|
||||
function validationEnvironment() {
|
||||
const env = { ...process.env };
|
||||
// Regression fixtures build their own publication modes. Do not let the
|
||||
// production-only portal payload gate leak into those isolated builds.
|
||||
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];
|
||||
return 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) {
|
||||
const allowed = new Set(['--dry-run', '--confirm']);
|
||||
|
||||
Reference in new issue
Block a user