From 3027278d93f64b047e82c2b6396cc47ca63b016f Mon Sep 17 00:00:00 2001 From: Brent Daniel Date: Tue, 30 Mar 2021 08:56:02 -0700 Subject: [PATCH] Update to 21.0.0.3 and improve parameterization --- Makefile | 3 ++- build.sh | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 8884182..4079bc3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -LIBERTY_VERSION=20.0.0.12 +LIBERTY_VERSION=21.0.0.3 JAVA8_IMAGE_VERSION=$(LIBERTY_VERSION)-java8 JAVA8_RUNTIME_IMAGE_VERSION=$(LIBERTY_VERSION)-runtime-java8 JAVA11_IMAGE_VERSION=$(LIBERTY_VERSION)-java11 @@ -11,6 +11,7 @@ build = ./build.sh script_env = \ IMAGE_NAME=$(IMAGE_NAME) \ + LIBERTY_VERSION=$(LIBERTY_VERSION) \ JAVA8_IMAGE_VERSION=$(JAVA8_IMAGE_VERSION) \ JAVA8_RUNTIME_IMAGE_VERSION=$(JAVA8_RUNTIME_IMAGE_VERSION) \ JAVA11_IMAGE_VERSION=$(JAVA11_IMAGE_VERSION) \ diff --git a/build.sh b/build.sh index 5818a7e..d02e155 100755 --- a/build.sh +++ b/build.sh @@ -1,35 +1,38 @@ #!/bin/bash -e SCRIPT_DIR=$(dirname $0) -# Build Java 8 builder image +JAVA8_BASE_IMAGE_NAME="ibmcom/websphere-liberty:${LIBERTY_VERSION}-full-java8-openj9-ubi" +JAVA11_BASE_IMAGE_NAME="ibmcom/websphere-liberty:${LIBERTY_VERSION}-full-java11-openj9-ubi" + +echo "Building Java 8 Builder Image" pushd ${SCRIPT_DIR}/images/java8/builder -cekit build docker +cekit build --overrides '{"from": "'"${JAVA8_BASE_IMAGE_NAME}"'"}' --overrides '{"version": "'"${JAVA8_IMAGE_VERSION}"'"}' docker popd -# Build Java 8 runtime image +echo "Building Java 8 Runtime Image" pushd ${SCRIPT_DIR}/images/java8/runtime -cekit build docker +cekit build --overrides '{"from": "'"${JAVA8_BASE_IMAGE_NAME}"'"}' --overrides '{"version": "'"${JAVA8_RUNTIME_IMAGE_VERSION}"'"}' docker popd # Test Java 8 image if TEST_MODE is set if [[ ! -z "${TEST_MODE:-}" ]]; then - echo Testing version ${JAVA8_IMAGE_VERSION} + echo "Testing versions ${JAVA8_IMAGE_VERSION} and ${JAVA8_RUNTIME_IMAGE_VERSION}" IMAGE_VERSION=${JAVA8_IMAGE_VERSION}; RUNTIME_IMAGE_VERSION=${JAVA8_RUNTIME_IMAGE_VERSION}; . ${SCRIPT_DIR}/test/run fi -# Build Java 11 builder image +echo "Building Java 11 Builder Image" pushd ${SCRIPT_DIR}/images/java11/builder -cekit build docker +cekit build --overrides '{"from": "'"${JAVA11_BASE_IMAGE_NAME}"'"}' --overrides '{"version": "'"${JAVA11_IMAGE_VERSION}"'"}' docker popd -# Build Java 11 runtime image +echo "Building Java 11 Runtime Image" pushd ${SCRIPT_DIR}/images/java11/runtime -cekit build docker +cekit build --overrides '{"from": "'"${JAVA11_BASE_IMAGE_NAME}"'"}' --overrides '{"version": "'"${JAVA11_RUNTIME_IMAGE_VERSION}"'"}' docker popd # Test Java 11 image if TEST_MODE is set if [[ ! -z "${TEST_MODE:-}" ]]; then - echo Testing version ${JAVA11_IMAGE_VERSION} + echo "Testing versions ${JAVA11_IMAGE_VERSION} and ${JAVA11_RUNTIME_IMAGE_VERSION}" IMAGE_VERSION=${JAVA11_IMAGE_VERSION}; RUNTIME_IMAGE_VERSION=${JAVA11_RUNTIME_IMAGE_VERSION}; . ${SCRIPT_DIR}/test/run fi