diff options
author | David Aguilar <davvid@gmail.com> | 2020-06-20 15:24:06 -0700 |
---|---|---|
committer | David Aguilar <davvid@gmail.com> | 2020-06-23 23:35:05 -0700 |
commit | a580a6240c7520f0be3e0c44ea8c01db319b8267 (patch) | |
tree | 4bf79b1d80d1c6f0a71f0dad2200a28d70366661 /jenkins_jobs | |
parent | bc585293b2e09d64484ebf6a8811266cf8c2cde8 (diff) | |
download | python-jenkins-job-builder-a580a6240c7520f0be3e0c44ea8c01db319b8267.tar.gz python-jenkins-job-builder-a580a6240c7520f0be3e0c44ea8c01db319b8267.tar.xz python-jenkins-job-builder-a580a6240c7520f0be3e0c44ea8c01db319b8267.zip |
publishers: add "threshold" support to join-trigger
The joinTrigger plugin now accepts a resultThreshold field instead
of the evenIfDownstreamUnstable boolean. Add support for a "threshold"
yaml field to manage this value.
Change-Id: I60ba999b963709a76854a4d50387d2b1eefae05f
Signed-off-by: David Aguilar <davvid@gmail.com>
Diffstat (limited to 'jenkins_jobs')
-rwxr-xr-x | jenkins_jobs/modules/publishers.py | 6 |
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 |