Skip to content

Commit ecd1a7c

Browse files
authored
Merge pull request #54 from Scalingo/fix/jvm-common
fix(deps): fix JDK installation
2 parents 393c4d1 + 560ffa4 commit ecd1a7c

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
strategy:
1919
matrix:
2020
stack:
21-
- scalingo-20
2221
- scalingo-22
2322
container:
2423
image: "scalingo/${{ matrix.stack }}:latest"

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
STACK := "scalingo-20"
1+
STACK := "scalingo-22"
22
BASH_COMMAND := /bin/bash
33

44
.DEFAULT := all
55

66
all: test
7-
test: test20 test22
7+
test: test22
88

99
test22: STACK := "scalingo-22"
1010

11-
test20 test22: BASH_COMMAND := test/run
12-
test20 test22: IMAGE := "scalingo/$(STACK):latest"
13-
test20 test22:
11+
test22: BASH_COMMAND := test/run
12+
test22: IMAGE := "scalingo/$(STACK):latest"
13+
test22:
1414
@echo "Running tests in Docker using $(IMAGE)"
1515
@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)"

bin/compile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if [[ -n "${BUILDPACK_DEBUG}" ]]; then
77
set -x
88
fi
99

10-
readonly build_dir="${1}"
11-
readonly cache_dir="${2}"
10+
build_dir="${1}"
11+
cache_dir="${2}"
1212
env_dir="${3}"
1313

1414
readonly java_version="${JAVA_VERSION:-1.8}"
@@ -33,6 +33,7 @@ install_webapp_runner() {
3333

3434
local build_d
3535
local cache_d
36+
local buildpack_d
3637

3738
local tmp_d
3839
local jre_version
@@ -43,8 +44,9 @@ install_webapp_runner() {
4344

4445
build_d="${1}"
4546
cache_d="${2}"
46-
jre_version="${3}"
47-
runner_version="${4}"
47+
buildpack_d="${3}"
48+
jre_version="${4}"
49+
runner_version="${5}"
4850

4951
local buildpacks_repository_url="https://buildpacks-repository.s3.eu-central-1.amazonaws.com"
5052

@@ -54,6 +56,7 @@ install_webapp_runner() {
5456
echo "-----> Installing Webapp Runner ${runner_version}..."
5557

5658
# Install JVM common tools:
59+
5760
cached_jvm_common="${cache_d}/jvm-common.tar.xz"
5861

5962
if [ ! -f "${cached_jvm_common}" ]
@@ -69,13 +72,12 @@ install_webapp_runner() {
6972
--directory "${tmp_d}"
7073

7174
# Source utilities and functions:
72-
source "${tmp_d}/bin/util"
7375
source "${tmp_d}/bin/java"
7476

7577
echo "java.runtime.version=${jre_version}" \
7678
> "${build_d}/system.properties"
7779

78-
install_java_with_overlay "${build_d}"
80+
install_openjdk "${build_d}" "${buildpack_d}"
7981

8082
rm -Rf "${tmp_d}"
8183
}
@@ -102,5 +104,5 @@ install_webapp_runner() {
102104
readonly -f install_webapp_runner
103105

104106

105-
install_webapp_runner "${build_dir}" "${cache_dir}" \
107+
install_webapp_runner "${build_dir}" "${cache_dir}" "${buildpack_dir}" \
106108
"${java_version}" "${webapp_runner_version}"

0 commit comments

Comments
 (0)