From 0d9805779d56ddd7809a086fce2c0267a63f0ee2 Mon Sep 17 00:00:00 2001 From: William Bell Date: Sat, 25 Apr 2026 01:39:16 +0100 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dd5d3902..090de4c9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,12 +15,18 @@ pipeline { stage('Install JDK 25') { steps { sh ''' - if ! java -version 2>&1 | grep -q "25"; then - curl -sL "https://api.adoptium.net/v3/binary/latest/25/ga/linux/x64/jdk/hotspot/normal/eclipse" \ + if [ ! -d "/opt/jdk25/bin" ]; then + echo "Installing JDK 25..." + curl -L "https://api.adoptium.net/v3/binary/latest/25/ga/linux/x64/jdk/hotspot/normal/eclipse" \ -o /tmp/jdk25.tar.gz + + rm -rf /opt/jdk25 mkdir -p /opt/jdk25 + tar -xzf /tmp/jdk25.tar.gz -C /opt/jdk25 --strip-components=1 fi + + ls -la /opt/jdk25/bin ''' } }