Skip to content

Commit

Permalink
Merge pull request #6 from brenthdaniel/21003
Browse files Browse the repository at this point in the history
Update to 21.0.0.3 and improve parameterization
  • Loading branch information
brenthdaniel authored Mar 30, 2021
2 parents 42ff907 + 3027278 commit 733159a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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) \
Expand Down
23 changes: 13 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 733159a

Please sign in to comment.