Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .buildkite/scripts/steps/firebase_deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ void (async () => {
dest: path.join(outDir, 'a11y-report'),
});

const chartsPackage = await getChartsPackageMetadata(true);
const { liveTarballDest, commitTarballDest, manifestDest, indexDest } = await prepareChartsPackagesForDeployment(
outDir,
chartsPackage,
);
const chartsPackage = bkEnv.isPullRequest ? await getChartsPackageMetadata(true) : null;
const chartsPackagePaths =
chartsPackage !== null ? await prepareChartsPackagesForDeployment(outDir, chartsPackage) : null;

startGroup('Check deployment files');

Expand All @@ -75,20 +73,20 @@ void (async () => {
const hasE2EIndex = fs.existsSync(path.join(outDir, 'e2e/index.html'));
const hasVrtReportIndex = fs.existsSync(path.join(outDir, 'vrt-report/index.html'));
const hasA11yReportIndex = fs.existsSync(path.join(outDir, 'a11y-report/index.html'));
const hasLiveChartsPackage = fs.existsSync(liveTarballDest);
const hasCommitChartsPackage = fs.existsSync(commitTarballDest);
const hasChartsPackageManifest = fs.existsSync(manifestDest);
const hasChartsPackageIndex = fs.existsSync(indexDest);
const missingFiles = [
['docs', hasDocsIndex],
['storybook', hasStorybookIndex],
['e2e server', hasE2EIndex],
['vrt report', hasVrtReportIndex],
['a11y report', hasA11yReportIndex],
['live charts package tarball', hasLiveChartsPackage],
['commit charts package tarball', hasCommitChartsPackage],
['charts package manifest', hasChartsPackageManifest],
['charts package index', hasChartsPackageIndex],
...(chartsPackagePaths
? ([
['live charts package tarball', fs.existsSync(chartsPackagePaths.liveTarballDest)],
['commit charts package tarball', fs.existsSync(chartsPackagePaths.commitTarballDest)],
['charts package manifest', fs.existsSync(chartsPackagePaths.manifestDest)],
['charts package index', fs.existsSync(chartsPackagePaths.indexDest)],
] as const)
: []),
]
.filter(([, exists]) => !exists)
.map<string>(([f]) => f as string);
Expand Down
25 changes: 11 additions & 14 deletions .buildkite/scripts/steps/firebase_pre_deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,27 @@ void (async () => {
dest: path.join(outDir, 'e2e'),
});

// Serve the packaged tarball from the preview site so downstream PRs can install it.
const chartsPackage = await getChartsPackageMetadata(true);
const { liveTarballDest, commitTarballDest, manifestDest, indexDest } = await prepareChartsPackagesForDeployment(
outDir,
chartsPackage,
);
const chartsPackage = bkEnv.isPullRequest ? await getChartsPackageMetadata(true) : null;
const chartsPackagePaths =
chartsPackage !== null ? await prepareChartsPackagesForDeployment(outDir, chartsPackage) : null;

startGroup('Check deployment files');

const hasDocsIndex = fs.existsSync('./e2e_server/public/index.html');
const hasStorybookIndex = fs.existsSync('./e2e_server/public/storybook/index.html');
const hasE2EIndex = fs.existsSync('./e2e_server/public/e2e/index.html');
const hasLiveChartsPackage = fs.existsSync(liveTarballDest);
const hasCommitChartsPackage = fs.existsSync(commitTarballDest);
const hasChartsPackageManifest = fs.existsSync(manifestDest);
const hasChartsPackageIndex = fs.existsSync(indexDest);
const missingFiles = [
['docs', hasDocsIndex],
['storybook', hasStorybookIndex],
['e2e server', hasE2EIndex],
['live charts package tarball', hasLiveChartsPackage],
['commit charts package tarball', hasCommitChartsPackage],
['charts package manifest', hasChartsPackageManifest],
['charts package index', hasChartsPackageIndex],
...(chartsPackagePaths
? ([
['live charts package tarball', fs.existsSync(chartsPackagePaths.liveTarballDest)],
['commit charts package tarball', fs.existsSync(chartsPackagePaths.commitTarballDest)],
['charts package manifest', fs.existsSync(chartsPackagePaths.manifestDest)],
['charts package index', fs.existsSync(chartsPackagePaths.indexDest)],
] as const)
: []),
]
.filter(([, exists]) => !exists)
.map<string>(([f]) => f as string);
Expand Down