[ci] Trigger VM image rebuild for cache rebuild only (#213497)

## Summary
When VM image rebuild is triggered after ES promotion, only the cache
warmup should be built.

This PR also separates the daily full build to a daily base + cache
build (in case ES promotions are failing for some reason, we should
still have a daily cache refresh).

Requires: https://github.com/elastic/ci-agent-images/pull/1295

With this, we'd run a daily base image build and cache build (~40m +
25m) + cache warmups for every promotion (~4x 25m) instead of a full
build and promotion per build (~4x 55m). Ultimately not that much of a
gain 🤷 (4*55=220m => 40+5x25=165m)
This commit is contained in:
Alex Szabo 2025-03-10 10:56:15 +01:00 committed by GitHub
parent 97e6a8d974
commit 830dbd4ed7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 8 deletions

View file

@ -27,17 +27,24 @@ spec:
provider_settings:
trigger_mode: none
schedules:
daily kibana image build:
daily kibana base image build:
branch: main
cronline: '0 0 * * *'
env:
IMAGES_CONFIG: kibana/images.yml
message: Builds Kibana VM images daily
IMAGES_CONFIG: kibana/base_image.yml
message: Builds Kibana VM base image daily
daily kibana cache layer build:
branch: main
cronline: '0 1 * * *' # make sure this runs after the daily kibana base image build
env:
IMAGES_CONFIG: kibana/image_cache.yml
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/base_image.yml'
message: Builds Kibana VM cache warmup daily
daily kibana fips image build:
branch: main
cronline: '0 4 * * *' # make sure this runs after the daily kibana image build
cronline: '0 4 * * *' # make sure this runs after the daily kibana cache image build
env:
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/images.yml'
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/base_image.yml,kibana/image_cache.yml'
IMAGES_CONFIG: kibana/fips.yml
message: Builds Kibana FIPS VM image daily
teams:

View file

@ -77,6 +77,7 @@ steps:
async: true
build:
env:
IMAGES_CONFIG: "kibana/images.yml"
IMAGES_CONFIG: 'kibana/image_cache.yml'
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/base_image.yml'
RETRY: "1"
EOF

View file

@ -25,6 +25,7 @@ steps:
async: true
build:
env:
IMAGES_CONFIG: "kibana/images.yml"
IMAGES_CONFIG: 'kibana/image_cache.yml'
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/base_image.yml'
RETRY: "1"
EOF

View file

@ -14,7 +14,8 @@ steps:
async: true
build:
env:
IMAGES_CONFIG: "kibana/images.yml"
IMAGES_CONFIG: 'kibana/image_cache.yml'
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/base_image.yml'
RETRY: "1"
EOF
else