Skip to content
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
strategy:
matrix:
stack:
- scalingo-20
- scalingo-22
container:
image: "scalingo/${{ matrix.stack }}:latest"
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)"
16 changes: 9 additions & 7 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -33,6 +33,7 @@ install_webapp_runner() {

local build_d
local cache_d
local buildpack_d

local tmp_d
local jre_version
Expand All @@ -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"

Expand All @@ -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}" ]
Expand All @@ -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}"
}
Expand All @@ -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}"