Skip to content

Commit

Permalink
Revert "Merge staging to prod - Version update (#76)"
Browse files Browse the repository at this point in the history
  • Loading branch information
gkwan-ibm authored Jun 4, 2021
1 parent 2ea103e commit 02621ca
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ For more information about the `springBootUtility` command, see the https://www.

The second stage begins with the [hotspot=OLimage2 file=0]`Open Liberty Docker image`. The Dockerfile copies the [hotspot=serverXml file=0]`server.xml` file from the `/opt/ol/wlp/templates` directory, which enables Spring Boot and TLS support. Then, the Dockerfile copies the Spring Boot dependent library JAR files that are at the [hotspot=libcache file=0]`lib.index.cache` directory and the [hotspot=thinjar file=0]`thin-guide-spring-boot-0.1.0.jar` file. The `lib.index.cache` directory and the `thin-guide-spring-boot-0.1.0.jar` file were both generated in the first stage.

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

Use the following command to build the Docker image:
[role='command']
Expand Down
4 changes: 2 additions & 2 deletions finish/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stage and thin the application
# tag::OLimage1[]
FROM openliberty/open-liberty:full-java11-openj9-ubi as staging
FROM openliberty/open-liberty:kernel-java8-openj9-ubi as staging
# end::OLimage1[]

# tag::copyJar[]
Expand All @@ -17,7 +17,7 @@ RUN springBootUtility thin \

# Build the image
# tag::OLimage2[]
FROM openliberty/open-liberty:full-java11-openj9-ubi
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
# end::OLimage2[]

ARG VERSION=1.0
Expand Down
15 changes: 2 additions & 13 deletions finish/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.5</version>
<version>2.2.7.RELEASE</version>
</parent>

<dependencies>
Expand All @@ -29,17 +29,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end::tests[] -->
</dependencies>

Expand Down Expand Up @@ -71,7 +60,7 @@
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.3.4</version>
<version>3.2.3</version>
<configuration>
<!-- tag::appsDirectory[] -->
<appsDirectory>apps</appsDirectory>
Expand Down
5 changes: 2 additions & 3 deletions scripts/dailyBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ while getopts t:d:b:u: flag; do
d) DRIVER="${OPTARG}" ;;
b) BUILD="${OPTARG}" ;;
u) DOCKER_USERNAME="${OPTARG}" ;;
*) echo "Invalid option";;
esac
done

echo "Testing daily build image"

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

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

sudo ../scripts/testApp.sh
5 changes: 2 additions & 3 deletions scripts/dockerImageTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ while getopts t:d: flag; 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>#,\#<configuration>#c<artifactId>liberty-maven-plugin</artifactId><version>3.2.3</version><configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/""$DATE""/""$DRIVER""</runtimeUrl></install>" pom.xml
sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#,\#<configuration>#c<artifactId>liberty-maven-plugin</artifactId><version>3.2.3</version><configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/"$DATE"/"$DRIVER"</runtimeUrl></install>" pom.xml
cat pom.xml

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

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

./mvnw -Dhttp.keepAlive=false \
-Dmaven.wagon.http.pool=false \
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \
-q clean package
./mvnw -q clean package

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

docker build -t springboot .
docker run -d --name springBootContainer -p 9080:9080 -p 9443:9443 springboot
Expand Down
13 changes: 1 addition & 12 deletions start/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.5</version>
<version>2.2.7.RELEASE</version>
</parent>

<dependencies>
Expand All @@ -30,17 +30,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end::tests[] -->
</dependencies>

Expand Down

0 comments on commit 02621ca

Please sign in to comment.