aboutsummaryrefslogtreecommitdiff
path: root/jenkins/bisect.jpl
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2017-11-29 15:43:07 +0000
committerGuillaume Tucker <guillaume.tucker@collabora.com>2018-01-16 10:32:41 +0000
commit5e08493f332c22443886bfa48265a6ad13763789 (patch)
tree0824de17824343ee5ea96b584520462c01a3b811 /jenkins/bisect.jpl
parente1a93e5a254bb686815f6a7eff851dd4c45ebe86 (diff)
bisect.jpl: move bisectStart check outside of stage block
To be consistent with the good/back checks, move the git rebase start test check outside of the Start stage block. The main pipeline block needs to return in order to abort the job, not the stage block. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r--jenkins/bisect.jpl18
1 files changed, 9 insertions, 9 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl
index 8c107a3..60d4214 100644
--- a/jenkins/bisect.jpl
+++ b/jenkins/bisect.jpl
@@ -243,7 +243,7 @@ def runTest(lava_ci, describe) {
*/
def bisectStart(kdir) {
- def status
+ def status = null
dir(kdir) {
status = sh(returnStatus: true, script: """
@@ -253,7 +253,7 @@ git bisect bad ${params.BAD_COMMIT}
""")
}
- return status
+ return (status == 0) ? true : false
}
def bisectNext(kdir, status) {
@@ -368,16 +368,16 @@ Bad: ${params.BAD_COMMIT}"""
stage("Start") {
timeout(time: 5, unit: 'MINUTES') {
- def start_result = bisectStart(kdir)
-
- if (start_result) {
- echo "Failed to start bisection, commits range may be invalid."
- currentBuild.result = 'ABORTED'
- return
- }
+ check = bisectStart(kdir)
}
}
+ if (!check) {
+ echo "Failed to start bisection, commits range may be invalid."
+ currentBuild.result = 'ABORTED'
+ return
+ }
+
def previous = params.GOOD_COMMIT
def current = getSHA(kdir)
def iteration = 1