Merge pull request #186 from akva2/simplify_jenkins_build_scripts

simplify jenkins build scripts a little
This commit is contained in:
Atgeirr Flø Rasmussen 2016-05-03 15:26:32 +02:00
commit 80c47f8c66
3 changed files with 37 additions and 55 deletions

View File

@ -38,25 +38,7 @@ function build_opm_upscaling {
test $? -eq 0 || exit 1
popd
# Build opm-parser
clone_and_build_module opm-parser "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_PARSER_REVISION $WORKSPACE/serial
test $? -eq 0 || exit 1
# Build opm-material
clone_and_build_module opm-material "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_MATERIAL_REVISION $WORKSPACE/serial
test $? -eq 0 || exit 1
# Build opm-core
clone_and_build_module opm-core "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_CORE_REVISION $WORKSPACE/serial
test $? -eq 0 || exit 1
# Build opm-grid
clone_and_build_module opm-grid "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_GRID_REVISION $WORKSPACE/serial
test $? -eq 0 || exit 1
# Build opm-output
clone_and_build_module opm-output "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_OUTPUT_REVISION $WORKSPACE/serial
test $? -eq 0 || exit 1
build_upstreams
# Build opm-upscaling
pushd .

View File

@ -2,14 +2,22 @@
source `dirname $0`/build-opm-upscaling.sh
declare -a upstreams
upstreams=(opm-parser
opm-material
opm-core
opm-grid
opm-output)
declare -A upstreamRev
upstreamRev[opm-parser]=master
upstreamRev[opm-material]=master
upstreamRev[opm-core]=master
upstreamRev[opm-grid]=master
upstreamRev[opm-output]=master
ERT_REVISION=master
OPM_COMMON_REVISION=master
OPM_PARSER_REVISION=master
OPM_MATERIAL_REVISION=master
OPM_CORE_REVISION=master
OPM_GRID_REVISION=master
OPM_OUTPUT_REVISION=master
OPM_UPSCALING_REVISION=$sha1
if grep -q "ert=" <<< $ghprbCommentBody
then
@ -21,32 +29,15 @@ then
OPM_COMMON_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge
fi
if grep -q "opm-parser=" <<< $ghprbCommentBody
then
OPM_PARSER_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-parser=([0-9]+).*/\1/g'`/merge
fi
for upstream in $upstreams
do
if grep -q "$upstream=" <<< $ghprbCommentBody
then
upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*$upstream=([0-9]+).*/\1/g"`/merge
fi
done
if grep -q "opm-material=" <<< $ghprbCommentBody
then
OPM_MATERIAL_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-material=([0-9]+).*/\1/g'`/merge
fi
if grep -q "opm-core=" <<< $ghprbCommentBody
then
OPM_CORE_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-core=([0-9]+).*/\1/g'`/merge
fi
if grep -q "opm-grid=" <<< $ghprbCommentBody
then
OPM_GRID_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-grid=([0-9]+).*/\1/g'`/merge
fi
if grep -q "opm-output=" <<< $ghprbCommentBody
then
OPM_OUTPUT_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-output=([0-9]+).*/\1/g'`/merge
fi
echo "Building with ert=$ERT_REVSIION opm-common=$OPM_COMMON_REVISION opm-parser=$OPM_PARSER_REVISION opm-material=$OPM_MATERIAL_REVISION opm-core=$OPM_CORE_REVISION opm-grid=$OPM_GRID_REVISION opm-output=$OPM_OUTPUT_REVISION opm-upscaling=$OPM_UPSCALING_REVISION"
echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=${upstreamRev[opm-parser]} opm-material=${upstreamRev[opm-material]} opm-core=${upstreamRev[opm-core]} opm-grid=${upstreamRev[opm-grid]} opm-output=${upstreamRev[opm-output]} opm-upscaling=$sha1"
build_opm_upscaling
test $? -eq 0 || exit 1

View File

@ -2,13 +2,22 @@
source `dirname $0`/build-opm-upscaling.sh
declare -a upstreams
upstreams=(opm-parser
opm-material
opm-core
opm-grid
opm-output)
declare -A upstreamRev
upstreamRev[opm-parser]=master
upstreamRev[opm-material]=master
upstreamRev[opm-core]=master
upstreamRev[opm-grid]=master
upstreamRev[opm-output]=master
ERT_REVISION=master
OPM_COMMON_REVISION=master
OPM_PARSER_REVISION=master
OPM_MATERIAL_REVISION=master
OPM_CORE_REVISION=master
OPM_GRID_REVISION=master
OPM_OUTPUT_REVISION=master
build_opm_upscaling
test $? -eq 0 || exit 1