From 8990bdfe4c0d4e0a73c1e6d9bfe83d350df63b05 Mon Sep 17 00:00:00 2001 From: Arsalan Khan Date: Wed, 16 Oct 2024 11:33:51 +0200 Subject: [PATCH 1/2] remove tag regex --- ci/autoscaler/pipeline.yml | 12 ++++----- .../tasks/update-sdk/update_java_package.sh | 26 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ci/autoscaler/pipeline.yml b/ci/autoscaler/pipeline.yml index 528af0340f..c94a201be6 100644 --- a/ci/autoscaler/pipeline.yml +++ b/ci/autoscaler/pipeline.yml @@ -167,15 +167,15 @@ resources: tag_filter: v0.* - name: java-release - type: git + type: github-release icon: github check_every: 5m source: - uri: https://github.com/SAP/SapMachine.git - branch: sapmachine21 # use JDK 21 as the LTS version - fetch_tags: true - tag_regex: 'sapmachine-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' - version_depth: 50 + owner: SAP + repository: SapMachine + access_token: ((autoscaler_access_token)) + release: true + tag_filter: "sapmachine-21.*" - name: gcp-jammy-stemcell type: bosh-io-stemcell diff --git a/ci/autoscaler/tasks/update-sdk/update_java_package.sh b/ci/autoscaler/tasks/update-sdk/update_java_package.sh index 2a9b96953d..9778e30f78 100755 --- a/ci/autoscaler/tasks/update-sdk/update_java_package.sh +++ b/ci/autoscaler/tasks/update-sdk/update_java_package.sh @@ -4,26 +4,24 @@ # It downloads the given SAP Machine java distribution and updates the bosh packaging with the new version. [ -n "${DEBUG}" ] && set -x -set -euo pipefail +set -euox pipefail script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" source "${script_dir}/vars.source.sh" - +ls -lah java_dir=${JAVA_DIR:-"${autoscaler_dir}/../SapMachine"} java_dir=$(realpath --canonicalize-existing "${java_dir}") pushd "${java_dir}" - java_major_version=$(grep "DEFAULT_JDK_SOURCE_TARGET_VERSION" make/conf/version-numbers.conf | cut -d= -f2) - java_version_interim=$(grep "DEFAULT_VERSION_INTERIM" make/conf/version-numbers.conf | cut -d= -f2) - java_version_update=$(grep "DEFAULT_VERSION_UPDATE" make/conf/version-numbers.conf | cut -d= -f2) - java_version_prerelease=$(grep "DEFAULT_PROMOTED_VERSION_PRE" make/conf/version-numbers.conf | cut -d= -f2) +# java_full_version=$(cat version | sed 's/^sapmachine-//' | sed 's/+//') +java_full_version=$(sed 's/^sapmachine-//; s/+//' version) popd -sapmachine_java_version="${java_major_version}.${java_version_interim}.${java_version_update}" -echo "Desired Java Version: ${sapmachine_java_version}" +sapmachine_java_version="${java_full_version}" +echo "Desired Java Version: ${java_full_version}" # consider only lts releases -if [ "${java_version_prerelease}" != "" ]; then +if [ "${java_full_version}" != "${sapmachine_java_version}" ]; then echo "java version ${sapmachine_java_version} is not a LTS release. skipping update" exit 0 fi @@ -48,12 +46,14 @@ if [ "${JAVA_VERSION}" == "${current_java_version}" ]; then exit 0 fi -# Step 1 --> Download java... -source "${script_dir}/download_java.sh" "${JAVA_VERSION}" -printf "\n" +#Step 1 --> Download java... +binary_name="sapmachine-jdk-${JAVA_VERSION}_linux-x64_bin.tar.gz" +mkdir -p "${autoscaler_dir}/src/binaries/jdk" +mv "${java_dir}/${binary_name}" "${autoscaler_dir}/src/binaries/jdk/${binary_name}" +#source "${script_dir}/download_java.sh" "${JAVA_VERSION}" +#printf "\n" # Step 2 --> upload blob to blobstore -binary_name="sapmachine-jdk-${JAVA_VERSION}_linux-x64_bin.tar.gz" pushd "${autoscaler_dir}" > /dev/null echo "- Adding and uploading blobs to release blobstore " bosh add-blob "src/binaries/jdk/${binary_name}" "${binary_name}" From 6f86cdaa31d63222a150d0c1c8833c662e07c47a Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot Date: Thu, 17 Oct 2024 08:05:23 +0100 Subject: [PATCH 2/2] Update java version to 21.0.5 --- config/blobs.yml | 4 ++++ packages/openjdk-21/spec | 2 +- packages/openjdk-21/version | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/blobs.yml b/config/blobs.yml index affa6ec68b..fdab55aa75 100644 --- a/config/blobs.yml +++ b/config/blobs.yml @@ -6,3 +6,7 @@ sapmachine-jdk-21.0.4_linux-x64_bin.tar.gz: size: 208055144 object_id: a5bb48f2-ae8e-4b00-7655-b553b1a264d7 sha: sha256:9c4779b48a9d6f8120901e6c095227baebd2af2d7d7db1b0196c144ae9b9397d +sapmachine-jdk-21.0.5_linux-x64_bin.tar.gz: + size: 207370814 + object_id: d02de734-556d-49ed-4d0d-4a92248be00c + sha: sha256:713056536aea7bbb1f93fe978df20f69e23f37171abf272068339f75525b84d3 diff --git a/packages/openjdk-21/spec b/packages/openjdk-21/spec index 5ea5e9c17e..cecfc85783 100644 --- a/packages/openjdk-21/spec +++ b/packages/openjdk-21/spec @@ -2,4 +2,4 @@ name: openjdk-21 dependencies: [] files: -- sapmachine-jdk-21.0.4_linux-x64_bin.tar.gz # from https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.4/sapmachine-jdk-21.0.4_linux-x64_bin.tar.gz +- sapmachine-jdk-21.0.5_linux-x64_bin.tar.gz # from https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.5/sapmachine-jdk-21.0.5_linux-x64_bin.tar.gz diff --git a/packages/openjdk-21/version b/packages/openjdk-21/version index 3af11cddcd..93b8ba970f 100644 --- a/packages/openjdk-21/version +++ b/packages/openjdk-21/version @@ -1 +1 @@ -21.0.4 \ No newline at end of file +21.0.5 \ No newline at end of file