Skip to content

Commit

Permalink
Merge branch 'development' into release-1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Apr 27, 2011
2 parents af8a5ba + 1219581 commit 4d4a4bf
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ BASEDIR=`pwd`
GRAILSVERS=1.2.0
JETTYVERS=6.1.21

# this is to provide a workaround for a grails bug for this version of
# grails, where grails does not listen to the gradle config content for proxies
export PROXY_DEFS=""
if [ -n "$http_proxy" ]; then
# assume that http_proxy is of format http://<host>:<port>
gradle_proxy_host=`echo $http_proxy|sed 's/http:\/\///'|awk -F ':' '{ print $1 }'`
gradle_proxy_port=`echo $http_proxy|awk -F ':' '{ print $3 }'`
export PROXY_DEFS="-Dhttp.proxyHost=$gradle_proxy_host -Dhttp.proxyPort=$gradle_proxy_port"
fi

prepare_build(){

mkdir -p $BUILD_ROOT
Expand Down Expand Up @@ -118,7 +128,8 @@ build_rundeck_core(){

cd $BASEDIR/core
echo "core build starting..."
./gradlew -PbuildNum=$RELNUM clean check assemble javadoc
echo ./gradlew $PROXY_DEFS -PbuildNum=$RELNUM clean check assemble javadoc
./gradlew $PROXY_DEFS -PbuildNum=$RELNUM clean check assemble javadoc
if [ 0 != $? ]
then
echo "Core build assemble failed: $!"
Expand Down Expand Up @@ -154,30 +165,30 @@ export PATH=$PATH:$GRAILS_HOME/bin
GWORKDIR=$BASEDIR/rundeckapp/work

#echo 'y' to the command to quell y/n prompt on second time running it:
yes | $GRAILS_HOME/bin/grails -Dgrails.project.work.dir=$GWORKDIR install-plugin jetty
yes | $GRAILS_HOME/bin/grails $PROXY_DEFS -Dgrails.project.work.dir=$GWORKDIR install-plugin jetty
if [ 0 != $? ]
then
echo "failed to install jetty plugin"
exit 2
fi

# # run clean and test
$GRAILS_HOME/bin/grails -Dgrails.project.work.dir=$GWORKDIR clean
$GRAILS_HOME/bin/grails $PROXY_DEFS -Dgrails.project.work.dir=$GWORKDIR clean
if [ 0 != $? ]
then
echo "Run Deck clean failed"
exit 2
fi

$GRAILS_HOME/bin/grails -Dgrails.project.work.dir=$GWORKDIR test-app
$GRAILS_HOME/bin/grails $PROXY_DEFS -Dgrails.project.work.dir=$GWORKDIR test-app
if [ 0 != $? ]
then
echo "Run Deck tests failed"
exit 2
fi

#run war phase
yes | $GRAILS_HOME/bin/grails -Dgrails.project.work.dir=$GWORKDIR prod build-launcher
yes | $GRAILS_HOME/bin/grails $PROXY_DEFS -Dgrails.project.work.dir=$GWORKDIR prod build-launcher
if [ 0 != $? ]
then
echo "Run Deck build failed"
Expand Down

0 comments on commit 4d4a4bf

Please sign in to comment.