[ci] Update VM cache for each ES snapshot (#205119)

Currently we're rebuilding our cache after the ES snapshot on main has
been promoted. This makes an assumption that less frequent cache builds
will save minutes over the chance of a build failure on main causing
snapshots for all other passing branches to be out of date.

That assumption hasn't been correct so far, so I'm moving the trigger to
all branches.
This commit is contained in:
Jon 2024-12-26 11:30:21 -06:00 committed by GitHub
parent 1e95b0ce87
commit c382c20ee5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -72,7 +72,7 @@ EOT
cat << EOF | buildkite-agent pipeline upload
steps:
- label: "Builds Kibana VM images for cache update"
- label: "Update cache for ES serverless image"
trigger: kibana-vm-images
async: true
build:

View file

@ -16,9 +16,11 @@ ts-node "$(dirname "${0}")/promote_manifest.ts" "$ES_SNAPSHOT_MANIFEST"
if [[ "$BUILDKITE_BRANCH" == "main" ]]; then
echo "--- Trigger agent packer cache pipeline"
ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-agent-packer-cache main
cat << EOF | buildkite-agent pipeline upload
fi
cat << EOF | buildkite-agent pipeline upload
steps:
- label: "Builds Kibana VM images for cache update"
- label: "Update cache for ES $BUILDKITE_BRANCH snapshot"
trigger: kibana-vm-images
async: true
build:
@ -26,4 +28,3 @@ steps:
IMAGES_CONFIG: "kibana/images.yml"
RETRY: "1"
EOF
fi