Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update java version to 21.0.5 #3277

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ci/autoscaler/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 8 additions & 18 deletions ci/autoscaler/tasks/update-sdk/update_java_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
Expand Down
4 changes: 4 additions & 0 deletions config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/openjdk-21/spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/openjdk-21/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.0.4
21.0.5
Loading