opm-simulators/jenkins/build.sh

47 lines
1.0 KiB
Bash
Raw Normal View History

2016-04-04 10:35:23 -05:00
#!/bin/bash
#Print commands as they execute
#set -x
declare -a upstreams
2019-10-15 07:36:05 -05:00
upstreams=(opm-common
opm-material
opm-grid
2019-08-23 01:34:32 -05:00
opm-models)
declare -A upstreamRev
upstreamRev[opm-common]=master
upstreamRev[opm-material]=master
upstreamRev[opm-grid]=master
2019-08-23 01:34:32 -05:00
upstreamRev[opm-models]=master
if grep -q "opm-common=" <<< $ghprbCommentBody
then
upstreamRev[opm-common]=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge
fi
# No downstreams currently
declare -a downstreams
declare -A downstreamRev
2016-04-04 10:35:23 -05:00
# Clone opm-common
pushd .
mkdir -p $WORKSPACE/deps/opm-common
cd $WORKSPACE/deps/opm-common
git init .
git remote add origin https://github.com/OPM/opm-common
git fetch --depth 1 origin ${upstreamRev[opm-common]}:branch_to_build
2016-04-04 10:35:23 -05:00
test $? -eq 0 || exit 1
git checkout branch_to_build
popd
source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh
parseRevisions
printHeader opm-simulators
# Setup opm-data
2018-04-03 05:40:34 -05:00
source $WORKSPACE/deps/opm-common/jenkins/setup-opm-tests.sh
2016-04-04 10:35:23 -05:00
build_module_full opm-simulators