Commit ae85157b by Luis Fernando Gomes Committed by builder

Add $APP_TARGET and $MVN_ARGS env var

parent d3b702a1
......@@ -55,6 +55,16 @@ $ curl 127.0.0.1:8080
application GIT repository. In case your application is located in a
sub-folder, you can set this variable to a *./myapplication*.
* **APP_TARGET** (default: '')
This variable specifies a relative location to your application binary inside the
container.
* **MVN_ARGS** (default: '')
This variable specifies the arguments for Maven inside the container.
## Contributing
In order to test your changes to this STI image or to the STI scripts, you can use the `test/run` script. Before that, you have to build the 'candidate' image:
......
......@@ -6,10 +6,11 @@ echo "---> Installing application source"
cp -Rf /tmp/src/. ./
echo "---> Building Spring Boot application from source"
echo "--> # MVN_ARGS = $MVN_ARGS"
if [ -f "mvnw" ]; then
./mvnw clean install
./mvnw clean install $MVN_ARGS
else
mvn clean install
mvn clean install $MVN_ARGS
fi
# Fix source directory permissions
......
......@@ -3,4 +3,6 @@
set -e
echo "---> Starting Spring Boot application"
java -jar `find target -name *.jar`
echo "--> # APP_TARGET = $APP_TARGET"
echo "--> # JAVA_OPTS = $JAVA_OPTS"
java $JAVA_OPTS -jar `find $APP_TARGET -name *.jar`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment