Skip to content

Commit

Permalink
buildkite: support version 21 for opentelemetry (#3621)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored May 20, 2024
1 parent b7b6229 commit 026cc5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ if [[ "$BUILDKITE_COMMAND" =~ .*"upload".* ]]; then
exit 0
fi

# Run always
source .buildkite/hooks/prepare-common.sh

if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-opentelemetry-benchmark" ]; then
source .buildkite/hooks/prepare-benchmark.sh
# NOTE: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/11323 might
# support .java-version, if so then it might be worthy to read the file.
JAVA_VERSION=21
source .buildkite/hooks/prepare-common.sh
fi

if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-snapshot" ]; then
Expand All @@ -25,6 +32,3 @@ fi
if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-release" ]; then
source .buildkite/hooks/prepare-release.sh
fi

# Run always
source .buildkite/hooks/prepare-common.sh
4 changes: 3 additions & 1 deletion .buildkite/hooks/prepare-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
set -eo pipefail

# Configure the java version
JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
if [ -z "$JAVA_VERSION" ] ; then
JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
fi
set +u
# In case the HOME is not available in the context of the runner.
if [ -z "${HOME}" ] ; then
Expand Down

0 comments on commit 026cc5e

Please sign in to comment.