@@ -14,33 +14,34 @@ set -euo pipefail
1414# Select the most recent build from the current branch.
1515# We collect snapshots, order by date, then collect BCs, order by date, and concat them; then we select the last.
1616# So if we have one (or more) BC, we will always prefer to use that. Otherwise we will use the latest snapshot.
17- MANIFEST =" $( curl -s https://artifacts.elastic.co/releases/TfEVhiaBGqR64ie0g0r0uUwNAbEQMu1Z/future-releases/stack.json |
17+ MANIFEST_URL =" $( curl -s https://artifacts.elastic.co/releases/TfEVhiaBGqR64ie0g0r0uUwNAbEQMu1Z/future-releases/stack.json |
1818jq " .releases[] |
1919select(.branch == \" $BUILDKITE_BRANCH \" ) |
2020select(.active_release == true) |
2121((.snapshots | to_entries | sort_by(.value.completed_at)) +
2222(.build_candidates | to_entries | sort_by(.value.completed_at))) |
2323last | .value.manifest_url" ) "
2424
25- if [[ -z " $MANIFEST " ]]; then
25+ if [[ -z " $MANIFEST_URL " ]]; then
2626 echo " No snapshots or build candidates for branch [$BUILDKITE_BRANCH ]"
2727 exit 0
2828fi
2929
30-
31- TARGET_COMMIT_HASH=" $( eval " curl -s $MANIFEST " | jq .projects.elasticsearch.commit_hash) "
32-
33- if [[ -z " $TARGET_COMMIT_HASH " ]]; then
34- echo " Cannot get the elasticsearch commit hash from [$MANIFEST ]"
30+ MANIFEST=" $( eval " curl -s $MANIFEST_URL " ) "
31+ if [[ -z " $MANIFEST " ]]; then
32+ echo " Cannot get the build manifest from [$MANIFEST_URL ]"
3533 exit 1
3634fi
3735
38- echo " Running bc-bwc tests on commit [$TARGET_COMMIT_HASH ]"
36+ TARGET_COMMIT_HASH=$( echo " $MANIFEST " | jq .projects.elasticsearch.commit_hash)
37+ TARGET_VERSION=$( echo " $MANIFEST " | jq .version)
38+
39+ echo " Running bc-bwc tests on [$TARGET_VERSION ] commit [$TARGET_COMMIT_HASH ]"
3940
4041cat << EOF | buildkite-agent pipeline upload
4142steps:
4243 - label: $BUILDKITE_BRANCH / bc-bwc
43- command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-file-fingerprints -Dtests.bwc.main.version=9.1.0 -Dtests.bwc.refspec.main=${TARGET_COMMIT_HASH} -Dtests.jvm.argline=\"-Des.serverless_transport=true\"
44+ command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-file-fingerprints -Dtests.bwc.main.version=${TARGET_VERSION} -Dtests.bwc.refspec.main=${TARGET_COMMIT_HASH} -Dtests.jvm.argline=\"-Des.serverless_transport=true\"
4445 timeout_in_minutes: 300
4546 agents:
4647 provider: gcp
0 commit comments