[ci] Validate bundle limits earlier (#199155)

Currently pull request builds that create bundle changes over the limits
defined in `packages/kbn-optimizer/limits.yml` receive an error in the
`Post Build` step. This information is available earlier, after the
`Build Distribution` step.

By failing earlier we can reduce the number of test runs caused by
bundle limit changes. The report created in the `Post Build` step will
continue to behave as it currently is.
This commit is contained in:
Jon 2024-11-06 11:52:53 -06:00 committed by GitHub
parent bdbfd03213
commit 78f566a4b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ if [[ ! "${DISABLE_CI_STATS_SHIPPING:-}" ]]; then
"--metrics" "build/kibana/node_modules/@kbn/ui-shared-deps-src/shared_built_assets/metrics.json"
)
if [ "$BUILDKITE_PIPELINE_SLUG" == "kibana-on-merge" ]; then
if [[ "$BUILDKITE_PIPELINE_SLUG" == "kibana-on-merge" ]] || [[ "$BUILDKITE_PIPELINE_SLUG" == "kibana-pull-request" ]]; then
cmd+=("--validate")
fi