From 9f332b87a4d0e53a80b3a896403b646cc1751c0b Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 21 Apr 2022 09:50:49 +0200 Subject: [PATCH] added: ability to use jenkins build scripts for release test building we need to be able to specify absolute refs to use for the repos rather than a pull request number. --- jenkins/build-opm-module.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/jenkins/build-opm-module.sh b/jenkins/build-opm-module.sh index 1d7d88f73..e42e074bf 100755 --- a/jenkins/build-opm-module.sh +++ b/jenkins/build-opm-module.sh @@ -16,7 +16,12 @@ function parseRevisions { do if grep -qi "$upstream=" <<< $ghprbCommentBody then - upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/merge + if test -n "$absolute_revisions" + then + upstreamRev[$upstream]=`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([^ ]+).*/\1/g"` + else + upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/merge + fi fi done if grep -q "with downstreams" <<< $ghprbCommentBody @@ -25,8 +30,13 @@ function parseRevisions { do if grep -qi "$downstream=" <<< $ghprbCommentBody then - downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/merge - fi + if test -n "$absolute_revisions" + then + downstreamRev[$downstream]=`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([^ ]+).*/\1/g"` + else + downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/merge + fi + fi done fi