From 4f656b093fc6552f48ddeff8f41e6402e72dc0aa 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, 14 insertions(+), 24 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..d551477a85 100755 --- a/ci/autoscaler/tasks/update-sdk/update_java_package.sh +++ b/ci/autoscaler/tasks/update-sdk/update_java_package.sh @@ -8,27 +8,16 @@ set -euo 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}" - -# consider only lts releases -if [ "${java_version_prerelease}" != "" ]; then - echo "java version ${sapmachine_java_version} is not a LTS release. skipping update" - exit 0 -fi - -JAVA_VERSION=${sapmachine_java_version:-"21.0.3"} +JAVA_VERSION=${java_full_version:-"21.0.3"} desired_major_version=${JAVA_VERSION%%.*} # identify current version @@ -48,12 +37,13 @@ if [ "${JAVA_VERSION}" == "${current_java_version}" ]; then exit 0 fi -# Step 1 --> Download java... -source "${script_dir}/download_java.sh" "${JAVA_VERSION}" +#Step 1 --> Identify 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}" 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 e81b40b5988b9e173ce6731e14af3834a4368a62 Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot Date: Thu, 17 Oct 2024 08:08:32 +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..ee82edff28 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: 7f14c36a-bce5-479e-512b-baf346cdf32f + 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