-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
48 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,5 @@ zktodo2test.dat.properties | |
/.project | ||
/.classpath | ||
/.settings | ||
/.openshift | ||
/zktodo2test.dat.script | ||
/nohup.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
# This is a simple build script and will be executed on your CI system if | ||
# available. Otherwise it will execute while your application is stopped | ||
# before the deploy step. This script gets executed directly, so it | ||
# could be python, php, ruby, etc. | ||
# | ||
# cannot write to ~/.m2 so we configure mvn to have a local jar cache elsewhere | ||
mkdir -p ${OPENSHIFT_DATA_DIR}/m2/repository | ||
echo -e "<settings><localRepository>${OPENSHIFT_DATA_DIR}m2/repository</localRepository>\n</settings>\n" > ${OPENSHIFT_DATA_DIR}/settings.xml | ||
# | ||
cd ${OPENSHIFT_REPO_DIR} | ||
mvn -Dmaven.test.skip=true -s ${OPENSHIFT_DATA_DIR}settings.xml package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# This deploy hook gets executed after dependencies are resolved and the | ||
# build hook has been run but before the application has been started back | ||
# up again. This script gets executed directly, so it could be python, php, | ||
# ruby, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
# This is a simple post deploy hook executed after your application | ||
# is deployed and started. This script gets executed directly, so | ||
# it could be python, php, ruby, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# This is a simple script and will be executed on your CI system if | ||
# available. Otherwise it will execute while your application is stopped | ||
# before the build step. This script gets executed directly, so it | ||
# could be python, php, ruby, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# The logic to start up your application should be put in this | ||
# script. The application will work only if it binds to | ||
# $OPENSHIFT_INTERNAL_IP:8080 | ||
# | ||
nohup java -Djetty.host=${OPENSHIFT_INTERNAL_IP} -Djetty.port=${OPENSHIFT_INTERNAL_PORT} -DDATABASE_URL=postgres://${OPENSHIFT_DB_USERNAME}:${OPENSHIFT_DB_PASSWORD}@${OPENSHIFT_DB_HOST}/${OPENSHIFT_GEAR_NAME} -jar ${OPENSHIFT_REPO_DIR}target/jetty-runner-jmx.jar --port ${OPENSHIFT_INTERNAL_PORT} --config ${OPENSHIFT_REPO_DIR}src/etc/jetty.xml ${OPENSHIFT_REPO_DIR}/target/zktodo2.war > ${OPENSHIFT_LOG_DIR}server.log 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# The logic to stop your application should be put in this script. | ||
# | ||
# Here we do a polite SIGTERM which both the jvm and jetty respond to (post deploy we will do a hard kill in case it stays hung) | ||
ps -ef | grep zktodo2.war | grep -v grep | awk '{ print $2 }' | xargs kill -SIGTERM > /dev/null 2>&1 | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters