Skip to content

Commit a1275c5

Browse files
authored
buildkite: print maven/java context (#209)
1 parent bee35ac commit a1275c5

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.buildkite/hooks/pre-command

+7-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ echo "--- Configure git context :git:"
5858
git config --global user.email "[email protected]"
5959
git config --global user.name "apmmachine"
6060

61-
echo "--- Install JDK17"
61+
echo "--- Install JDK17 :java:"
6262
JAVA_URL=https://jvm-catalog.elastic.co/jdk
6363
JAVA_HOME=$(pwd)/.openjdk17
6464
JAVA_PKG="$JAVA_URL/latest_openjdk_17_linux.tar.gz"
@@ -67,4 +67,9 @@ mkdir -p "$JAVA_HOME"
6767
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
6868

6969
export JAVA_HOME
70-
export PATH=$JAVA_HOME/bin:$PATH
70+
PATH=$JAVA_HOME/bin:$PATH
71+
export PATH
72+
73+
echo "--- Debug JDK installation :coffee:"
74+
tree "$JAVA_HOME" || true
75+
java -version || true

.ci/release.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ trap clean_up EXIT
2121
# Avoid detached HEAD since the release plugin requires to be on a branch
2222
git checkout -f "${branch_specifier}"
2323

24+
echo "--- Debug JDK installation :coffee:"
25+
echo $JAVA_HOME
26+
echo $PATH
27+
java -version
28+
2429
set +x
2530
echo "--- Release the binaries to Maven Central :maven:"
2631
if [[ "$dry_run" == "true" ]] ; then
27-
echo './mvnw release:prepare release:perform --settings .ci/settings.xml --batch-mode'
32+
echo './mvnw -V release:prepare release:perform --settings .ci/settings.xml --batch-mode'
2833
else
2934
# providing settings in arguments to make sure they are propagated to the forked maven release process
30-
./mvnw release:prepare release:perform --settings .ci/settings.xml -Darguments="--settings .ci/settings.xml" --batch-mode | tee release.txt
35+
./mvnw -V release:prepare release:perform --settings .ci/settings.xml -Darguments="--settings .ci/settings.xml" --batch-mode | tee release.txt
3136
fi

.ci/snapshot.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ clean_up () {
1818
}
1919
trap clean_up EXIT
2020

21+
echo "--- Debug JDK installation :coffee:"
22+
echo $JAVA_HOME
23+
echo $PATH
24+
java -version
25+
2126
set +x
2227
echo "--- Deploy the snapshot :package:"
2328
if [[ "$dry_run" == "true" ]] ; then
24-
echo './mvnw -s .ci/settings.xml -Pgpg clean deploy --batch-mode'
29+
echo './mvnw -V -s .ci/settings.xml -Pgpg clean deploy --batch-mode'
2530
else
26-
./mvnw -s .ci/settings.xml -Pgpg clean deploy --batch-mode | tee snapshot.txt
31+
./mvnw -V -s .ci/settings.xml -Pgpg clean deploy --batch-mode | tee snapshot.txt
2732
fi

0 commit comments

Comments
 (0)