Skip to content

Commit 9371a61

Browse files
authored
[ES-12994] Pass JDK major and identifier to JDK benchmark (elastic#136549)
Fixes and extends https://buildkite.com/elastic/elasticsearch-java-ea-check-new-build pipeline.
1 parent 90db8f2 commit 9371a61

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.buildkite/scripts/trigger-if-java-ea-new-build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
RECENT_TIME_WINDOW=${RECENT_TIME_WINDOW:-24}
1414

1515
# Extract current JDK major version from bundled_jdk in version.properties
16-
CURRENT_JDK=$(grep "^bundled_jdk =" build-tools-internal/version.properties | cut -d'=' -f2 | tr -d ' ' | cut -d'.' -f1)
16+
CURRENT_JDK=$(grep "^bundled_jdk =" build-tools-internal/version.properties | cut -d'=' -f2 | tr -d ' ' | cut -d'+' -f1)
1717
TARGET_JDK=$((CURRENT_JDK + 1))
1818

1919
echo "Current JDK major version: $CURRENT_JDK"
@@ -80,13 +80,13 @@ echo "SHOULD_TRIGGER: $SHOULD_TRIGGER"
8080

8181
if [[ "$SHOULD_TRIGGER" == "true" ]]; then
8282
EFFECTIVE_START_DATE=$(date -u -d "@$BUILD_TIME" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -r "$BUILD_TIME" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || echo "")
83-
83+
8484
# Use "master" branch for elasticsearch-performance-esbench-jdk when BUILDKITE_BRANCH is "main"
8585
TRIGGER_BRANCH="$BUILDKITE_BRANCH"
8686
if [[ "$BUILDKITE_BRANCH" == "main" ]]; then
8787
TRIGGER_BRANCH="master"
8888
fi
89-
89+
9090
echo "Triggering performance-esbench-jdk for new jdk build $JDK_IDENTIFIER"
9191
cat << EOF | buildkite-agent pipeline upload
9292
steps:
@@ -98,5 +98,7 @@ steps:
9898
env:
9999
EFFECTIVE_START_DATE: "$EFFECTIVE_START_DATE"
100100
EXECUTION_MODE: "start-run"
101+
JDK_VERSION: "$TARGET_JDK"
102+
JDK_IDENTIFIER: "$JDK_IDENTIFIER"
101103
EOF
102104
fi

0 commit comments

Comments
 (0)