diff --git a/README.md b/README.md index 8aae20d..57d2abc 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,16 @@ oc create -f .openshiftio/database.yaml Once the database is up and running, we can deploy the application using Dekorate: -``` +```bash mvn clean verify -Popenshift -Ddekorate.deploy=true ``` +To deploy the application using a specific Spring Boot version use the `-Dspring-boot.version` switch. + +```bash +mvn clean verify -Popenshift -Ddekorate.deploy=true -Dspring-boot.version=2.6.7 +``` + ## Deploying application on OpenShift using Helm First, make sure you have installed [the Helm command line](https://helm.sh/docs/intro/install/) and connected/logged to a kubernetes cluster. @@ -66,10 +72,18 @@ helm uninstall crud ## Running Tests on OpenShift using Dekorate -``` +```bash ./run_tests_with_dekorate.sh ``` +Alternativelly, tests can be executed against a specific Spring Boot version by passing the +version as a `-v` parameter. + +```bash +./run_tests_with_dekorate.sh -v "2.6.7" +``` + + ## Running Tests on OpenShift using S2i from Source ``` diff --git a/pom.xml b/pom.xml index 1d3033c..05727bc 100644 --- a/pom.xml +++ b/pom.xml @@ -16,16 +16,11 @@ --> 4.0.0 - - dev.snowdrop - snowdrop-dependencies - 2.5.12.Final - dev.snowdrop.example crud - 2.5.12-3-SNAPSHOT - Spring Boot - CRUD Example - Spring Boot - CRUD Example + 2.9.3 + Dekorate - Spring Boot - CRUD Example + Dekorate - Spring Boot - CRUD Example 1.8 1.8 @@ -33,6 +28,7 @@ 2.22.2 42.3.3 2.5.12 + 2.9.3 @@ -76,6 +72,26 @@ https://maven.repository.redhat.com/earlyaccess/all/ + + + + + io.dekorate + dekorate-spring-bom + ${dekorate.version} + pom + import + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + + org.springframework.boot @@ -84,7 +100,44 @@ org.springframework.boot spring-boot-starter-data-jpa + + + org.hibernate + hibernate-core + + + + + org.hibernate.validator + hibernate-validator + 6.0.22.Final-redhat-00002 + + + + + org.hibernate + hibernate-core + 5.3.24.Final-redhat-00001 + + + org.apache.geronimo.specs + geronimo-jta_1.1_spec + + + + + org.hibernate + hibernate-entitymanager + 5.3.24.Final-redhat-00001 + + + org.apache.geronimo.specs + geronimo-jta_1.1_spec + + + + org.springframework.boot spring-boot-starter-actuator @@ -131,6 +184,7 @@ test + @@ -151,13 +205,10 @@ - - org.apache.maven.plugins - maven-surefire-plugin - org.springframework.boot spring-boot-maven-plugin + ${spring-boot.version} @@ -174,6 +225,7 @@ + local diff --git a/run_tests_with_dekorate.sh b/run_tests_with_dekorate.sh index 9c8eda2..23df5a9 100755 --- a/run_tests_with_dekorate.sh +++ b/run_tests_with_dekorate.sh @@ -9,5 +9,17 @@ if [[ $(waitFor "my-database" "app") -eq 1 ]] ; then exit 1 fi +SB_VERSION_SWITCH="" + +while getopts v: option +do + case "${option}" + in + v)SB_VERSION_SWITCH="-Dspring-boot.version=${OPTARG}";; + esac +done + +echo "SB_VERSION_SWITCH: ${SB_VERSION_SWITCH}" + # Run OpenShift Tests -./mvnw -s .github/mvn-settings.xml clean verify -Popenshift,openshift-it +eval "./mvnw -s .github/mvn-settings.xml clean verify -Popenshift,openshift-it ${SB_VERSION_SWITCH}"