diff options
author | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-05-21 09:34:59 +0100 |
---|---|---|
committer | Matt Hart <github@blacklabsystems.com> | 2018-05-23 14:33:19 +0100 |
commit | d946a9f169d3d8d80c3308c8d94a8f4924a7e73e (patch) | |
tree | 9635b08eb2c0054acd725d91041b309c7f7dac14 /jenkins/bisect.jpl | |
parent | 47bfc8bfcec8e9dbec38e4fdc1a614755c93778f (diff) |
bisect.jpl: add white list parameters for labs and trees
Add LABS_WHITELIST and TREES_WHITELIST job parameters to only run
bisections if the lab name or kernel tree are on those whitelists. If
the filter fails, the job is aborted. When these parameters are not
defined, no filtering is applied and all jobs are run. Labs and trees
filters are independent with labs being filtered first.
This is useful for bisections automatically triggered on all
regressions, which is the usual case in kernelci-backend.
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r-- | jenkins/bisect.jpl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl index 3ee1cfa..8ef68fd 100644 --- a/jenkins/bisect.jpl +++ b/jenkins/bisect.jpl @@ -67,6 +67,10 @@ DISABLE_CONFIGS List of kernel config options to disable, separated by a whitespace EMAIL_RECIPIENTS List of recipients for all emails generated by this job +LABS_WHITELIST + If defined, jobs will abort if the LAB is not on that list. +TREES_WHITELIST + If defined, jobs will abort if the KERNEL_TREE is not on that list. */ @@ -414,6 +418,26 @@ ${params_summary}""" return } + if (params.LABS_WHITELIST) { + def labs = params.LABS_WHITELIST.tokenize(' ') + + if (!labs.contains(params.LAB)) { + echo "Lab not on whitelist, aborting." + currentBuild.result = 'ABORTED' + return + } + } + + if (params.TREES_WHITELIST) { + def trees = params.TREES_WHITELIST.tokenize(' ') + + if (!trees.contains(params.KERNEL_TREE)) { + echo "Tree not on whitelist, aborting." + currentBuild.result = 'ABORTED' + return + } + } + try { stage("Init") { timeout(time: 30, unit: 'MINUTES') { |