From 0dc091e3ba9605129afc1ece5ce97f9ff614a537 Mon Sep 17 00:00:00 2001 From: Joel Strasser Date: Wed, 11 Jan 2023 21:42:16 +0100 Subject: [PATCH 1/2] fixes scripts for linux agent --- src/main/resources/linux_start_go_agent.template.flth | 4 +++- src/main/resources/post_provision_script.template.ftlh | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/linux_start_go_agent.template.flth b/src/main/resources/linux_start_go_agent.template.flth index 32a289c..ac372fe 100644 --- a/src/main/resources/linux_start_go_agent.template.flth +++ b/src/main/resources/linux_start_go_agent.template.flth @@ -1,7 +1,9 @@ +#!/usr/bin/env bash + set -e agent_dir="/var/lib/go-agent" -default_jre_dir="/var/lib/jdk/jdk-12" +default_jre_dir="/var/lib/jdk/jdk-11.0.17" if [ ! -x "$(command -v java)" ]; then export GO_JAVA_HOME=$default_jre_dir diff --git a/src/main/resources/post_provision_script.template.ftlh b/src/main/resources/post_provision_script.template.ftlh index 0b410cd..00a85dd 100755 --- a/src/main/resources/post_provision_script.template.ftlh +++ b/src/main/resources/post_provision_script.template.ftlh @@ -2,17 +2,17 @@ set -e -java_download_url="https://download.java.net/java/GA/jdk13.0.2/d4173c853231432d94f001e99d882ca7/8/GPL/openjdk-13.0.2_linux-x64_bin.tar.gz" +java_download_url="https://download.bell-sw.com/java/11.0.17+7/bellsoft-jdk11.0.17+7-linux-amd64.tar.gz" reset_dir () { rm -rf $1 - mkdir $1 + mkdir -p $1 } install_java () { wget $java_download_url reset_dir /var/lib/jdk - tar -xvf openjdk-13.0.2_linux-x64_bin.tar.gz -C /var/lib/jdk/ + tar -xvf bellsoft-jdk11.0.17+7-linux-amd64.tar.gz -C /var/lib/jdk/ } echo "Setting up unzip utility" From 3ad87ab4c9b87d0276ed8ab01545c4fe1c13b7a4 Mon Sep 17 00:00:00 2001 From: Joel Strasser Date: Thu, 12 Jan 2023 22:12:11 +0100 Subject: [PATCH 2/2] uses adoptium jdk 17 jre --- src/main/resources/linux_start_go_agent.template.flth | 2 +- src/main/resources/post_provision_script.template.ftlh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/linux_start_go_agent.template.flth b/src/main/resources/linux_start_go_agent.template.flth index ac372fe..a57aa1a 100644 --- a/src/main/resources/linux_start_go_agent.template.flth +++ b/src/main/resources/linux_start_go_agent.template.flth @@ -3,7 +3,7 @@ set -e agent_dir="/var/lib/go-agent" -default_jre_dir="/var/lib/jdk/jdk-11.0.17" +default_jre_dir="/var/lib/jdk/jdk-17.0.5+8-jre" if [ ! -x "$(command -v java)" ]; then export GO_JAVA_HOME=$default_jre_dir diff --git a/src/main/resources/post_provision_script.template.ftlh b/src/main/resources/post_provision_script.template.ftlh index 00a85dd..74ebd50 100755 --- a/src/main/resources/post_provision_script.template.ftlh +++ b/src/main/resources/post_provision_script.template.ftlh @@ -2,7 +2,7 @@ set -e -java_download_url="https://download.bell-sw.com/java/11.0.17+7/bellsoft-jdk11.0.17+7-linux-amd64.tar.gz" +java_download_url="https://api.adoptium.net/v3/binary/version/jdk-17.0.5%2B8/linux/x64/jre/hotspot/normal/eclipse?project=jdk" reset_dir () { rm -rf $1 @@ -10,9 +10,9 @@ reset_dir () { } install_java () { - wget $java_download_url + wget $java_download_url --output-document=jre17.tar.gz reset_dir /var/lib/jdk - tar -xvf bellsoft-jdk11.0.17+7-linux-amd64.tar.gz -C /var/lib/jdk/ + tar -xvf jre17.tar.gz -C /var/lib/jdk/ } echo "Setting up unzip utility"