summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-07-15 14:13:49 +0000
committerGerrit Code Review <review@openstack.org>2020-07-15 14:13:49 +0000
commit4968b81b616b3f0e431bd72faa671a5ee70d89c4 (patch)
treef6ee02010ec00ad5de4fc1301b532cd3b7606a6f /jenkins_jobs
parent84aed0ad4ea407b9815345feaff9332c327c8d66 (diff)
parenta580a6240c7520f0be3e0c44ea8c01db319b8267 (diff)
downloadpython-jenkins-job-builder-4968b81b616b3f0e431bd72faa671a5ee70d89c4.tar.gz
python-jenkins-job-builder-4968b81b616b3f0e431bd72faa671a5ee70d89c4.tar.xz
python-jenkins-job-builder-4968b81b616b3f0e431bd72faa671a5ee70d89c4.zip
Merge "publishers: add "threshold" support to join-trigger"
Diffstat (limited to 'jenkins_jobs')
-rwxr-xr-xjenkins_jobs/modules/publishers.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py
index fc28baed..48bb420c 100755
--- a/jenkins_jobs/modules/publishers.py
+++ b/jenkins_jobs/modules/publishers.py
@@ -3496,6 +3496,8 @@ def join_trigger(registry, xml_parent, data):
:arg list projects: list of projects to trigger
:arg list publishers: list of triggers from publishers module that
defines projects that need to be triggered
+ :arg str threshold: result threshold to trigger jobs (optional).
+ Valid values are "success", "unstable", "failure", and "aborted".
:arg bool even-if-unstable: if true jobs will trigger even if some
downstream jobs are marked as unstable (default false) (DEPRECATED)
@@ -3519,6 +3521,10 @@ def join_trigger(registry, xml_parent, data):
if unstable:
XML.SubElement(jointrigger, "evenIfDownstreamUnstable").text = unstable
+ threshold = data.get("threshold", "")
+ if threshold:
+ helpers.trigger_threshold(jointrigger, "resultThreshold", threshold)
+
def jabber(registry, xml_parent, data):
"""yaml: jabber