Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #4 from docker/autoexec
Adding autoexec support
Jim Van Fleet committed Sep 14, 2016
2 parents 87238d9 + 20e45d0 commit c736ad6
Showing 4 changed files with 18 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM bigfleet/shibboleth_sp
FROM tier/shibboleth_sp

# Define args and set a default value
ARG maintainer=tier
@@ -32,6 +32,8 @@ RUN mkdir -p /opt/grouper/$VERSION \
mlocate \
&& yum clean all



# The installer creates a HSQL DB which we ignore later

WORKDIR /opt/grouper/$version
13 changes: 10 additions & 3 deletions Jenkinsfile
@@ -36,7 +36,7 @@ node('docker') {

stage 'Build'
try{
sh 'bin/build.sh &> debug'
sh 'bin/rebuild.sh &> debug'
} catch(error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem building the Base Image. \n\n ${error_details}"
@@ -49,8 +49,15 @@ node('docker') {

stage 'Tests'

sh 'bin/test.sh'
// should build a finally construct here
try{
sh 'bin/test.sh &> debug'
} catch(error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem testing ${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}

stage 'Stop container'

sh 'bin/ci-stop.sh'
2 changes: 1 addition & 1 deletion common.bash
@@ -1,3 +1,3 @@
maintainer="bigfleet"
maintainer="tier"
imagename="grouper"
version="2.3.0"
4 changes: 4 additions & 0 deletions container_files/bin/start.sh
@@ -11,12 +11,14 @@ then
if [ "$laststatus" != "0" ]; then
echo "Not composed non-zero exit status: $laststatus" >> $log
echo "Not composed non-zero exit status: $laststatus"
/opt/autoexec/bin/firstrun.sh
exit 1
else
echo "Grouper was configured" >>$log
echo "Grouper was configured"
echo "Starting tomcat and apache" >>$log
echo "Starting tomcat and apache"
/opt/autoexec/bin/firstrun.sh
/usr/local/bin/httpd-shib-foreground &
/opt/grouper/2.3.0/apache-tomcat-6.0.35/bin/catalina.sh run
fi
@@ -42,12 +44,14 @@ else
if [ "$laststatus" != "0" ]; then
echo "Composed non-zero exit status: $laststatus" >> $log
echo "Composed non-zero exit status: $laststatus"
/opt/autoexec/bin/firstrun.sh
exit 1
else
echo "Grouper was configured" >>$log
echo "Grouper was configured"
echo "Starting tomcat and apache" >>$log
echo "Starting tomcat and apache"
/opt/autoexec/bin/firstrun.sh
date >> $log
/usr/local/bin/httpd-shib-foreground &
/opt/grouper/2.3.0/apache-tomcat-6.0.35/bin/catalina.sh run

0 comments on commit c736ad6

Please sign in to comment.