diff options
author | Chris Koehnke <chris.koehnke@protonmail.com> | 2019-04-24 19:20:21 -0400 |
---|---|---|
committer | Chris Koehnke <chris.koehnke@protonmail.com> | 2019-04-26 13:14:09 -0400 |
commit | a90f084f9319b81063afde9b71742892c0c14216 (patch) | |
tree | 8e0e2fa71202790024721008b7a27f6f3adebe6a /jenkins_jobs | |
parent | 9b0fd46eee4d3306d50a4acfd44eb1b28bbb655c (diff) | |
download | python-jenkins-job-builder-a90f084f9319b81063afde9b71742892c0c14216.tar.gz python-jenkins-job-builder-a90f084f9319b81063afde9b71742892c0c14216.tar.xz python-jenkins-job-builder-a90f084f9319b81063afde9b71742892c0c14216.zip |
Add 'skip-initial-build' to project multibranch
Adds support for the skip initial build option added by
https://github.com/jenkinsci/basic-branch-build-strategies-plugin/pull/4.
Change-Id: I903de7605fa1f0e3ada027ada07a7972d2ca9603
Diffstat (limited to 'jenkins_jobs')
-rw-r--r-- | jenkins_jobs/modules/project_multibranch.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/project_multibranch.py b/jenkins_jobs/modules/project_multibranch.py index 207594f0..a563f24f 100644 --- a/jenkins_jobs/modules/project_multibranch.py +++ b/jenkins_jobs/modules/project_multibranch.py @@ -1025,6 +1025,8 @@ def build_strategies(xml_parent, data): (optional, default false) * **regular-branches** (bool): Builds regular branches whenever a change is detected. (optional, default None) + * **skip-initial-build** (bool): Skip initial build on first branch + indexing. (optional, default None) * **named-branches** (list): Builds named branches whenever a change is detected. @@ -1079,6 +1081,12 @@ def build_strategies(xml_parent, data): 'plugin': 'basic-branch-build-strategies', }) + if bbs_list.get('skip-initial-build', False): + XML.SubElement(bbs, ''.join([basic_build_strategies, + '.SkipInitialBuildOnFirstBranchIndexing']), { + 'plugin': 'basic-branch-build-strategies', + }) + if 'change-request' in bbs_list: cr = bbs_list['change-request'] cr_elem = XML.SubElement(bbs, ''.join([basic_build_strategies, |