Skip to content

Adding autoexec support #4

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bigfleet/shibboleth_sp
FROM tier/shibboleth_sp

# Define args and set a default value
ARG maintainer=tier
Expand Down Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion common.bash
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down