Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 94f0fe3

Browse files
Fix step to save bundle size on main builds (#42859)
1 parent 0d77cc7 commit 94f0fe3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

enterprise/dev/ci/internal/ci/cache_helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ func withYarnCache() buildkite.StepOpt {
1313
})
1414
}
1515

16-
func withBundleSizeCache() buildkite.StepOpt {
16+
func withBundleSizeCache(commit string) buildkite.StepOpt {
1717
return buildkite.Cache(&buildkite.CacheOptions{
1818
ID: "bundle_size_cache",
1919
Key: "bundle_size_cache-{{ git.commit }}",
2020
RestoreKeys: []string{"bundle_size_cache-{{ git.commit }}"},
21-
Paths: []string{"ui/assets/stats-{{ git.commit }}.json"},
21+
Paths: []string{"ui/assets/stats-" + commit + ".json"},
2222
Compress: true,
2323
})
2424
}

enterprise/dev/ci/internal/ci/operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func addWebEnterpriseBuild(pipeline *bk.Pipeline, opts CoreTestOperationsOptions
222222
cmds = append(cmds,
223223
// Emit a stats.json file for bundle size diffs
224224
bk.Env("WEBPACK_EXPORT_STATS_FILENAME", "stats-"+commit+".json"),
225-
withBundleSizeCache())
225+
withBundleSizeCache(commit))
226226
}
227227

228228
if opts.CreateBundleSizeDiff {

0 commit comments

Comments
 (0)