Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Commit

Permalink
Add s2i files
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoulliard committed Jan 13, 2017
1 parent 8b39b86 commit fa09e7c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
target/
.s2i/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
Expand Down
3 changes: 3 additions & 0 deletions .s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
APP_VERSION=1.0
curl -o /deployments/generator-swarm.jar -L https://repository.jboss.org/nexus/content/repositories/public/org/obsidiantoaster/generator-backend/1.0.0.Alpha1/generator-backend-1.0.0.Alpha1-swarm.jar
26 changes: 26 additions & 0 deletions .s2i/bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

#
# Original File : https://github.com/fabric8io-images/s2i/blob/master/java/images/jboss/s2i/run
#

# Command line arguments given to this script
args="$*"

# Global S2I variable setup
source `dirname "$0"`/s2i-setup

# Always include jolokia-opts, which can be empty if switched off via env
JAVA_OPTIONS="${JAVA_OPTIONS:+${JAVA_OPTIONS} }$(/opt/jolokia/jolokia-opts)"

# Temporary options variable until the harmonization hawt-app PR #5 has been applied (hopefully)
JVM_ARGS="${JVM_ARGS:+${JVM_ARGS} }${JAVA_OPTIONS}"
export JAVA_OPTIONS JVM_ARGS

if [ -f "${DEPLOYMENTS_DIR}/bin/run.sh" ]; then
echo "Starting the application using the bundled ${DEPLOYMENTS_DIR}/bin/run.sh ..."
exec ${DEPLOYMENTS_DIR}/bin/run.sh $args ${JAVA_ARGS}
else
echo "Starting the Java application using /opt/run-java/run-java.sh ..."
exec /opt/run-java/run-java.sh $args ${JAVA_ARGS}
fi
9 changes: 9 additions & 0 deletions .s2i/bin/s2i-setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Original File : https://github.com/fabric8io-images/s2i/blob/master/java/images/jboss/s2i/s2i-setup
#

# Local vars setup with defaults
S2I_DESTINATION=${S2I_DESTINATION:-/tmp}
S2I_SOURCE_DIR="${S2I_DESTINATION}/src"
S2I_ARTIFACTS_DIR="${S2I_DESTINATION}/artifacts"
DEPLOYMENTS_DIR="/deployments"

0 comments on commit fa09e7c

Please sign in to comment.