Skip to content

Commit

Permalink
Version update (#107)
Browse files Browse the repository at this point in the history
* update versions

* Update dailyBuild.sh

* Update dailyBuild.sh

* Update dailyBuild.sh

* Update dockerImageTest.sh

* Update testApp.sh

* Update testApp.sh
  • Loading branch information
gkwan-ibm authored May 31, 2021
1 parent cf30e5b commit fd8727b
Show file tree
Hide file tree
Showing 18 changed files with 60 additions and 58 deletions.
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ To build these microservices, navigate to the `start` directory and run the foll
mvn package
```

include::{common-includes}/ol-kernel-docker-pull.adoc[]
include::{common-includes}/ol-full-docker-pull.adoc[]

Next, run the `docker build` commands to build the container images for your application:
[role='command']
Expand All @@ -263,7 +263,7 @@ Verify that the `system:1.0-SNAPSHOT` and `inventory:1.0-SNAPSHOT` images are li
REPOSITORY TAG
system 1.0-SNAPSHOT
inventory 1.0-SNAPSHOT
openliberty/open-liberty kernel-java8-openj9-ubi
openliberty/open-liberty full-java11-openj9-ubi
----

If you don't see the `system:1.0-SNAPSHOT` and `inventory:1.0-SNAPSHOT` images, then check the Maven
Expand Down
2 changes: 1 addition & 1 deletion finish/inventory/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
FROM openliberty/open-liberty:full-java11-openj9-ubi

ARG VERSION=1.0
ARG REVISION=SNAPSHOT
Expand Down
12 changes: 6 additions & 6 deletions finish/inventory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,27 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>3.3</version>
<version>4.0.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version>
<version>5.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -82,13 +82,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<version>3.3.1</version>
</plugin>
<!-- Enable Liberty Maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.2</version>
<version>3.3.4</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions finish/inventory/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<featureManager>
<feature>jaxrs-2.1</feature>
<feature>cdi-2.0</feature>
<feature>mpRestClient-1.4</feature>
<feature>mpConfig-1.4</feature>
<feature>mpRestClient-2.0</feature>
<feature>mpConfig-2.0</feature>
<feature>jsonp-1.1</feature>
</featureManager>

Expand Down
8 changes: 4 additions & 4 deletions finish/inventory/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2020 IBM Corp.
Copyright (c) 2016, 2021 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,11 +30,11 @@ <h2>Eclipse MicroProfile</h2>
<p>
For more information about the features used in this application, see the Open Liberty documentation:
<ul>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-3.3.html" target="_blank" rel="noopener noreferrer">MicroProfile 3.3</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-4.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 4.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jaxrs-2.1.html" target="_blank" rel="noopener noreferrer">Java RESTful Services 2.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-2.0.html" target="_blank" rel="noopener noreferrer">Contexts and Dependency Injection 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-1.4.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 1.4</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-1.4.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 1.4</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-2.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-2.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-1.1.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Processing 1.1</a></li>
</ul>
</p>
Expand Down
2 changes: 1 addition & 1 deletion finish/system/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
FROM openliberty/open-liberty:full-java11-openj9-ubi

ARG VERSION=1.0
ARG REVISION=SNAPSHOT
Expand Down
12 changes: 6 additions & 6 deletions finish/system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>3.3</version>
<version>4.0.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version>
<version>5.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -66,13 +66,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<version>3.3.1</version>
</plugin>
<!-- Enable Liberty Maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.2</version>
<version>3.3.4</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions finish/system/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2020 IBM Corp.
Copyright (c) 2016, 2021 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@ <h2>Eclipse MicroProfile</h2>
<p>
For more information about the features used in this application, see the Open Liberty documentation:
<ul>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-3.3.html" target="_blank" rel="noopener noreferrer">MicroProfile 3.3</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-4.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 4.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jaxrs-2.1.html" target="_blank" rel="noopener noreferrer">Java RESTful Services 2.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-2.0.html" target="_blank" rel="noopener noreferrer">Contexts and Dependency Injection 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-1.1.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Processing 1.1</a></li>
Expand Down
7 changes: 4 additions & 3 deletions scripts/dailyBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ do
d) DRIVER="${OPTARG}";;
b) BUILD="${OPTARG}";;
u) DOCKER_USERNAME="${OPTARG}";;
*) echo "Invalid option";;
esac
done

echo "Testing daily OpenLiberty image"

sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#a<configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/"$DATE"/"$DRIVER"</runtimeUrl></install></configuration>" inventory/pom.xml system/pom.xml
sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#a<configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/$DATE/$DRIVER</runtimeUrl></install></configuration>" inventory/pom.xml system/pom.xml
cat inventory/pom.xml system/pom.xml

sed -i "s;FROM openliberty/open-liberty:kernel-java8-openj9-ubi;FROM "$DOCKER_USERNAME"/olguides:"$BUILD";g" system/Dockerfile inventory/Dockerfile
sed -i "s;FROM openliberty/open-liberty:full-java8-openj9-ubi;FROM $DOCKER_USERNAME/olguides:$BUILD;g" system/Dockerfile inventory/Dockerfile
cat system/Dockerfile inventory/Dockerfile

docker pull $DOCKER_USERNAME"/olguides:"$BUILD
docker pull "$DOCKER_USERNAME/olguides:$BUILD"

../scripts/startMinikube.sh
../scripts/testApp.sh
Expand Down
5 changes: 3 additions & 2 deletions scripts/dockerImageTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ do
case "${flag}" in
t) DATE="${OPTARG}";;
d) DRIVER="${OPTARG}";;
*) echo "Invalid option";;
esac
done

echo "Testing latest OpenLiberty Docker image"

sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#a<configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/"$DATE"/"$DRIVER"</runtimeUrl></install></configuration>" inventory/pom.xml system/pom.xml
sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#a<configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/$DATE/$DRIVER</runtimeUrl></install></configuration>" inventory/pom.xml system/pom.xml
cat inventory/pom.xml system/pom.xml

sed -i "s;FROM openliberty/open-liberty:kernel-java8-openj9-ubi;FROM openliberty/daily:latest;g" system/Dockerfile inventory/Dockerfile
sed -i "s;FROM openliberty/open-liberty:full-java11-openj9-ubi;FROM openliberty/daily:latest;g" system/Dockerfile inventory/Dockerfile
cat system/Dockerfile inventory/Dockerfile

docker pull "openliberty/daily:latest"
Expand Down
14 changes: 7 additions & 7 deletions scripts/testApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euxo pipefail

mvn -q package

docker pull openliberty/open-liberty:kernel-java8-openj9-ubi
docker pull openliberty/open-liberty:full-java11-openj9-ubi

docker build -t system:1.0-SNAPSHOT system/.
docker build -t inventory:1.0-SNAPSHOT inventory/.
Expand All @@ -19,16 +19,16 @@ sleep 120

kubectl get pods

echo `minikube ip`
minikube ip

curl http://`minikube ip`:31000/system/properties
curl http://`minikube ip`:32000/api/inventory/systems/system-service
curl "http://$(minikube ip):31000/system/properties"
curl "http://$(minikube ip):32000/api/inventory/systems/system-service"

mvn failsafe:integration-test -Dcluster.ip=`minikube ip`
mvn failsafe:integration-test "-Dcluster.ip=$(minikube ip)"
mvn failsafe:verify

kubectl logs $(kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}' | grep system)
kubectl logs $(kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}' | grep inventory)
kubectl logs "$(kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}' | grep system)"
kubectl logs "$(kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}' | grep inventory)"

# Clear .m2 cache
rm -rf ~/.m2
2 changes: 1 addition & 1 deletion start/inventory/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
FROM openliberty/open-liberty:full-java11-openj9-ubi

ARG VERSION=1.0
ARG REVISION=SNAPSHOT
Expand Down
12 changes: 6 additions & 6 deletions start/inventory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>3.3</version>
<version>4.0.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version>
<version>5.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -74,13 +74,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<version>3.3.1</version>
</plugin>
<!-- Enable Liberty Maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.2</version>
<version>3.3.4</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions start/inventory/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<featureManager>
<feature>jaxrs-2.1</feature>
<feature>cdi-2.0</feature>
<feature>mpRestClient-1.4</feature>
<feature>mpConfig-1.4</feature>
<feature>mpRestClient-2.0</feature>
<feature>mpConfig-2.0</feature>
<feature>jsonp-1.1</feature>
</featureManager>

Expand Down
8 changes: 4 additions & 4 deletions start/inventory/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2020 IBM Corp.
Copyright (c) 2016, 2021 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,11 +30,11 @@ <h2>Eclipse MicroProfile</h2>
<p>
For more information about the features used in this application, see the Open Liberty documentation:
<ul>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-3.3.html" target="_blank" rel="noopener noreferrer">MicroProfile 3.3</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-4.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 4.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jaxrs-2.1.html" target="_blank" rel="noopener noreferrer">Java RESTful Services 2.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-2.0.html" target="_blank" rel="noopener noreferrer">Contexts and Dependency Injection 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-1.4.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 1.4</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-1.4.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 1.4</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-2.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-2.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-1.1.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Processing 1.1</a></li>
</ul>
</p>
Expand Down
2 changes: 1 addition & 1 deletion start/system/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
FROM openliberty/open-liberty:full-java11-openj9-ubi

ARG VERSION=1.0
ARG REVISION=SNAPSHOT
Expand Down
12 changes: 6 additions & 6 deletions start/system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>3.3</version>
<version>4.0.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version>
<version>5.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.3.6</version>
<version>3.4.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -66,13 +66,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<version>3.3.1</version>
</plugin>
<!-- Enable Liberty Maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.2</version>
<version>3.3.4</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
Expand Down
Loading

0 comments on commit fd8727b

Please sign in to comment.