Skip to content

Adding autoexec support #4

1 commit merged into from Sep 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Adding autoexec support
Jim Van Fleet committed Sep 14, 2016
commit 20e45d063feaa9a323742a32ccb30c566ae1d440
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