mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
[CI] fix benchmark to pull snapshot version (#16308)
- fixes the CI benchmark script to always runs against the latest snapshot version - uses `/v1/versions/$VERSION/builds/latest` to get the latest build id Fixes: #16307 Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
This commit is contained in:
parent
ea0c16870f
commit
2404bad9a9
1 changed files with 3 additions and 2 deletions
|
@ -106,8 +106,9 @@ pull_images() {
|
||||||
if [[ -n "$LS_VERSION" ]]; then
|
if [[ -n "$LS_VERSION" ]]; then
|
||||||
docker pull "docker.elastic.co/logstash/logstash:$LS_VERSION"
|
docker pull "docker.elastic.co/logstash/logstash:$LS_VERSION"
|
||||||
else
|
else
|
||||||
LS_VERSION=$( curl --retry-all-errors --retry 5 --retry-delay 1 -s https://artifacts-api.elastic.co/v1/versions | jq -r ".versions[-1]" )
|
# select the SNAPSHOT artifact with the highest semantic version number
|
||||||
BUILD_ID=$( curl --retry-all-errors --retry 5 --retry-delay 1 -s https://artifacts-api.elastic.co/v1/branches/master/builds | jq -r ".builds[0]" )
|
LS_VERSION=$( curl --retry-all-errors --retry 5 --retry-delay 1 -s https://artifacts-api.elastic.co/v1/versions | jq -r '.versions | map(select(endswith("-SNAPSHOT"))) | max_by(rtrimstr("-SNAPSHOT")|split(".")|map(tonumber))' )
|
||||||
|
BUILD_ID=$(curl --retry-all-errors --retry 5 --retry-delay 1 -s "https://artifacts-api.elastic.co/v1/versions/${LS_VERSION}/builds/latest" | jq -re '.build.build_id')
|
||||||
ARCH=$(arch)
|
ARCH=$(arch)
|
||||||
IMAGE_URL="https://snapshots.elastic.co/${BUILD_ID}/downloads/logstash/logstash-$LS_VERSION-docker-image-$ARCH.tar.gz"
|
IMAGE_URL="https://snapshots.elastic.co/${BUILD_ID}/downloads/logstash/logstash-$LS_VERSION-docker-image-$ARCH.tar.gz"
|
||||||
IMAGE_FILENAME="$LS_VERSION.tar.gz"
|
IMAGE_FILENAME="$LS_VERSION.tar.gz"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue