From 8ea0b62b33cda6e5514ad12c983880e3af2f9268 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 22 Aug 2016 13:23:30 +0200 Subject: [PATCH] simplify jenkins build scripts after ert reorganization --- jenkins/build-opm-core.sh | 22 ++-------------------- jenkins/build-pr.sh | 12 ++++-------- jenkins/build.sh | 5 +++-- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/jenkins/build-opm-core.sh b/jenkins/build-opm-core.sh index c99c2bf6..137bbfd5 100755 --- a/jenkins/build-opm-core.sh +++ b/jenkins/build-opm-core.sh @@ -1,25 +1,6 @@ #!/bin/bash function build_opm_core { - # Build ERT - pushd . - mkdir -p $WORKSPACE/deps/ert - cd $WORKSPACE/deps/ert - git init . - git remote add origin https://github.com/Ensembles/ert - git fetch --depth 1 origin $ERT_REVISION:branch_to_build - test $? -eq 0 || exit 1 - git checkout branch_to_build - popd - - pushd . - mkdir -p serial/build-ert - cd serial/build-ert - cmake $WORKSPACE/deps/ert/devel -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install - cmake --build . --target install - test $? -eq 0 || exit 1 - popd - # Build opm-common pushd . mkdir -p $WORKSPACE/deps/opm-common @@ -30,10 +11,11 @@ function build_opm_core { test $? -eq 0 || exit 1 git checkout branch_to_build popd + source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh pushd . - mkdir serial/build-opm-common + mkdir -p serial/build-opm-common cd serial/build-opm-common build_module "-DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" 0 $WORKSPACE/deps/opm-common popd diff --git a/jenkins/build-pr.sh b/jenkins/build-pr.sh index 0b71111f..f1ae77b9 100755 --- a/jenkins/build-pr.sh +++ b/jenkins/build-pr.sh @@ -4,23 +4,19 @@ source `dirname $0`/build-opm-core.sh # Upstream revisions declare -a upstreams -upstreams=(opm-parser +upstreams=(ert + opm-parser opm-material opm-output) declare -A upstreamRev +upstreamRev[ert]=master upstreamRev[opm-parser]=master upstreamRev[opm-material]=master upstreamRev[opm-output]=master -ERT_REVISION=master OPM_COMMON_REVISION=master -if grep -q "ert=" <<< $ghprbCommentBody -then - ERT_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*ert=([0-9]+).*/\1/g'`/merge -fi - if grep -q "opm-common=" <<< $ghprbCommentBody then OPM_COMMON_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge @@ -34,7 +30,7 @@ do fi done -echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=${upstreamRev[opm-parser]} opm-material=${upstreamRev[opm-material]} opm-output=${upstreamRev[opm-output]} opm-core=$sha1" +echo "Building with opm-common=$OPM_COMMON_REVISION ert=${upstreamRev[ert]} opm-parser=${upstreamRev[opm-parser]} opm-material=${upstreamRev[opm-material]} opm-output=${upstreamRev[opm-output]} opm-core=$sha1" build_opm_core test $? -eq 0 || exit 1 diff --git a/jenkins/build.sh b/jenkins/build.sh index 97bcdff7..d0e91032 100755 --- a/jenkins/build.sh +++ b/jenkins/build.sh @@ -4,16 +4,17 @@ source `dirname $0`/build-opm-core.sh # Upstream revisions declare -a upstreams -upstreams=(opm-parser +upstreams=(ert + opm-parser opm-material opm-output) declare -A upstreamRev +upstreamRev[ert]=master upstreamRev[opm-parser]=master upstreamRev[opm-material]=master upstreamRev[opm-output]=master -ERT_REVISION=master OPM_COMMON_REVISION=master build_opm_core