From 066803725bec4157ab53b55b5d25b46d787d910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 4 Aug 2025 11:22:25 +0200 Subject: [PATCH 1/4] fix(deps): fix JDK installation Update the way we setup OpenJDK, following https://github.com/Scalingo/buildpack-jvm-common/pull/61 --- bin/compile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/compile b/bin/compile index 7d37301..62d4db9 100755 --- a/bin/compile +++ b/bin/compile @@ -33,6 +33,7 @@ install_webapp_runner() { local build_d local cache_d + local buildpack_d local tmp_d local jre_version @@ -43,8 +44,9 @@ install_webapp_runner() { build_d="${1}" cache_d="${2}" - jre_version="${3}" - runner_version="${4}" + buildpack_d="${3}" + jre_version="${4}" + runner_version="${5}" local buildpacks_repository_url="https://buildpacks-repository.s3.eu-central-1.amazonaws.com" @@ -54,6 +56,7 @@ install_webapp_runner() { echo "-----> Installing Webapp Runner ${runner_version}..." # Install JVM common tools: + cached_jvm_common="${cache_d}/jvm-common.tar.xz" if [ ! -f "${cached_jvm_common}" ] @@ -69,13 +72,12 @@ install_webapp_runner() { --directory "${tmp_d}" # Source utilities and functions: - source "${tmp_d}/bin/util" source "${tmp_d}/bin/java" echo "java.runtime.version=${jre_version}" \ > "${build_d}/system.properties" - install_java_with_overlay "${build_d}" + install_openjdk "${build_d}" "${buildpack_d}" rm -Rf "${tmp_d}" } @@ -102,5 +104,5 @@ install_webapp_runner() { readonly -f install_webapp_runner -install_webapp_runner "${build_dir}" "${cache_dir}" \ +install_webapp_runner "${build_dir}" "${cache_dir}" "${buildpack_dir}" \ "${java_version}" "${webapp_runner_version}" From 3333810d56ad7ba2fc64bd709919fe3603413122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 4 Aug 2025 11:49:02 +0200 Subject: [PATCH 2/4] fix: remove 'readonly' flag for some vars Some `readonly` variables are already defined in anothe buildpack, making the buildpack and tests fail. --- bin/compile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 62d4db9..11dbf79 100755 --- a/bin/compile +++ b/bin/compile @@ -7,8 +7,8 @@ if [[ -n "${BUILDPACK_DEBUG}" ]]; then set -x fi -readonly build_dir="${1}" -readonly cache_dir="${2}" +build_dir="${1}" +cache_dir="${2}" env_dir="${3}" readonly java_version="${JAVA_VERSION:-1.8}" From 3934a154f321996aa33b96e844db127477f86f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 4 Aug 2025 12:06:32 +0200 Subject: [PATCH 3/4] fix(tests): don't test with scalingo-20 anymore --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e2c8543..eaafd31 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ -STACK := "scalingo-20" +STACK := "scalingo-22" BASH_COMMAND := /bin/bash .DEFAULT := all all: test -test: test20 test22 +test: test22 test22: STACK := "scalingo-22" -test20 test22: BASH_COMMAND := test/run -test20 test22: IMAGE := "scalingo/$(STACK):latest" -test20 test22: +test22: BASH_COMMAND := test/run +test22: IMAGE := "scalingo/$(STACK):latest" +test22: @echo "Running tests in Docker using $(IMAGE)" @docker run --pull always --mount type=bind,src=$(PWD),dst=/buildpack --workdir /buildpack --rm --interactive --tty --env "GITLAB_TOKEN=$(GITLAB_TOKEN)" --env "GITHUB_TOKEN=$(GITHUB_TOKEN)" --env "STACK=$(STACK)" $(IMAGE) bash -c "$(BASH_COMMAND)" From 560ffa411d8b25aebd845f2d7f778c41509867cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 4 Aug 2025 12:30:16 +0200 Subject: [PATCH 4/4] fix(tests): remove 'scalingo-20' from CI --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d6ff58..1a067d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,6 @@ jobs: strategy: matrix: stack: - - scalingo-20 - scalingo-22 container: image: "scalingo/${{ matrix.stack }}:latest"