summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/definition.rst12
-rw-r--r--jenkins_jobs/builder.py43
-rw-r--r--jenkins_jobs/cli/subcommand/update.py19
-rw-r--r--jenkins_jobs/local_yaml.py65
-rw-r--r--jenkins_jobs/modules/builders.py20
-rw-r--r--jenkins_jobs/modules/parameters.py10
-rw-r--r--jenkins_jobs/modules/properties.py35
-rw-r--r--jenkins_jobs/modules/publishers.py26
-rw-r--r--jenkins_jobs/modules/triggers.py111
-rw-r--r--jenkins_jobs/modules/view_list.py386
-rw-r--r--jenkins_jobs/modules/wrappers.py10
-rw-r--r--tests/jenkins_manager/test_manager.py2
-rw-r--r--tests/localyaml/fixtures/joinlists.json8
-rw-r--r--tests/localyaml/fixtures/joinlists.yaml13
-rw-r--r--tests/parameters/fixtures/extended-choice-param-full.xml38
-rw-r--r--tests/parameters/fixtures/extended-choice-param-full.yaml25
-rw-r--r--tests/publishers/fixtures/postbuildscript000.plugins_info.yaml2
-rw-r--r--tests/publishers/fixtures/postbuildscript001.plugins_info.yaml2
-rw-r--r--tests/publishers/fixtures/postbuildscript002.plugins_info.yaml2
-rw-r--r--tests/publishers/fixtures/postbuildscript003.plugins_info.yaml2
-rw-r--r--tests/publishers/fixtures/postbuildscript004.plugins_info.yaml2
-rw-r--r--tests/triggers/fixtures/gitlab001.xml2
-rw-r--r--tests/triggers/fixtures/gitlab002.xml2
-rw-r--r--tests/triggers/fixtures/gitlab003.xml2
-rw-r--r--tests/triggers/fixtures/gitlab004.xml2
-rw-r--r--tests/triggers/fixtures/gitlab005.xml2
-rw-r--r--tests/triggers/fixtures/gitlab006.xml2
-rw-r--r--tests/triggers/fixtures/gitlab007.plugins_info.yaml3
-rw-r--r--tests/triggers/fixtures/gitlab007.xml27
-rw-r--r--tests/triggers/fixtures/gitlab007.yaml19
-rw-r--r--tests/triggers/fixtures/gitlab008.plugins_info.yaml3
-rw-r--r--tests/triggers/fixtures/gitlab008.xml27
-rw-r--r--tests/triggers/fixtures/gitlab008.yaml11
-rw-r--r--tests/triggers/fixtures/jira-changelog-full.xml32
-rw-r--r--tests/triggers/fixtures/jira-changelog-full.yaml19
-rw-r--r--tests/triggers/fixtures/jira-changelog-minimal.xml10
-rw-r--r--tests/triggers/fixtures/jira-changelog-minimal.yaml2
-rw-r--r--tests/views/fixtures/view_list_build_status_full.xml30
-rw-r--r--tests/views/fixtures/view_list_build_status_full.yaml13
-rw-r--r--tests/views/fixtures/view_list_build_status_min.xml30
-rw-r--r--tests/views/fixtures/view_list_build_status_min.yaml10
-rw-r--r--tests/views/fixtures/view_list_fallback_full001.xml28
-rw-r--r--tests/views/fixtures/view_list_fallback_full001.yaml10
-rw-r--r--tests/views/fixtures/view_list_fallback_full002.xml28
-rw-r--r--tests/views/fixtures/view_list_fallback_full002.yaml10
-rw-r--r--tests/views/fixtures/view_list_jobtype_filter_full.xml28
-rw-r--r--tests/views/fixtures/view_list_jobtype_filter_full.yaml11
-rw-r--r--tests/views/fixtures/view_list_jobtype_filter_min.xml28
-rw-r--r--tests/views/fixtures/view_list_jobtype_filter_min.yaml10
-rw-r--r--tests/views/fixtures/view_list_otherviews_filter_full.xml28
-rw-r--r--tests/views/fixtures/view_list_otherviews_filter_full.yaml11
-rw-r--r--tests/views/fixtures/view_list_otherviews_filter_min.xml28
-rw-r--r--tests/views/fixtures/view_list_otherviews_filter_min.yaml10
-rw-r--r--tests/views/fixtures/view_list_parameter_filter_full.xml34
-rw-r--r--tests/views/fixtures/view_list_parameter_filter_full.yaml17
-rw-r--r--tests/views/fixtures/view_list_parameter_filter_min.xml34
-rw-r--r--tests/views/fixtures/view_list_parameter_filter_min.yaml11
-rw-r--r--tests/views/fixtures/view_list_regexjobs_filter_full.xml29
-rw-r--r--tests/views/fixtures/view_list_regexjobs_filter_full.yaml12
-rw-r--r--tests/views/fixtures/view_list_regexjobs_filter_min.xml29
-rw-r--r--tests/views/fixtures/view_list_regexjobs_filter_min.yaml11
-rw-r--r--tests/views/fixtures/view_list_scmtype_filter_full.xml28
-rw-r--r--tests/views/fixtures/view_list_scmtype_filter_full.yaml11
-rw-r--r--tests/views/fixtures/view_list_securedjobs_filter_full.xml27
-rw-r--r--tests/views/fixtures/view_list_securedjobs_filter_full.yaml10
-rw-r--r--tests/views/fixtures/view_list_security_filter_full.xml31
-rw-r--r--tests/views/fixtures/view_list_security_filter_full.yaml14
-rw-r--r--tests/views/fixtures/view_list_security_filter_min.xml31
-rw-r--r--tests/views/fixtures/view_list_security_filter_min.yaml10
-rw-r--r--tests/views/fixtures/view_list_unclassified_filter_full.xml27
-rw-r--r--tests/views/fixtures/view_list_unclassified_filter_full.yaml10
-rw-r--r--tests/views/fixtures/view_list_upstream_downstream_filter_full.xml30
-rw-r--r--tests/views/fixtures/view_list_upstream_downstream_filter_full.yaml13
-rw-r--r--tests/views/fixtures/view_list_upstream_downstream_filter_min.xml30
-rw-r--r--tests/views/fixtures/view_list_upstream_downstream_filter_min.yaml10
-rw-r--r--tests/views/fixtures/view_list_userrelevence_filter_full.xml38
-rw-r--r--tests/views/fixtures/view_list_userrelevence_filter_full.yaml21
-rw-r--r--tests/views/fixtures/view_list_userrelevence_filter_min.xml38
-rw-r--r--tests/views/fixtures/view_list_userrelevence_filter_min.yaml10
-rw-r--r--tests/wrappers/fixtures/env-script001.xml2
-rw-r--r--tests/wrappers/fixtures/env-script002.xml2
-rw-r--r--tests/yamlparser/fixtures/string_join.xml69
-rw-r--r--tests/yamlparser/fixtures/string_join.yaml66
-rw-r--r--tests/yamlparser/fixtures/variable_defaults.xml39
-rw-r--r--tests/yamlparser/fixtures/variable_defaults.yaml16
-rw-r--r--tox.ini2
86 files changed, 1956 insertions, 117 deletions
diff --git a/doc/source/definition.rst b/doc/source/definition.rst
index 1848590..2361a50 100644
--- a/doc/source/definition.rst
+++ b/doc/source/definition.rst
@@ -367,7 +367,7 @@ It's possible to assign an `id` to any of the blocks and then use that
367to reference it instead of the name. This has two primary functions: 367to reference it instead of the name. This has two primary functions:
368 368
369* A unique identifier where you wish to use the same naming format for 369* A unique identifier where you wish to use the same naming format for
370 multiple templates. This allows to follow a naming scheme while 370 multiple templates. This allows you to follow a naming scheme while
371 still using multiple templates to handle subtle variables in job 371 still using multiple templates to handle subtle variables in job
372 requirements. 372 requirements.
373* Provides a simpler name for a `job-template` where you have multiple 373* Provides a simpler name for a `job-template` where you have multiple
@@ -474,6 +474,16 @@ For example, having a configuration file with that option enabled:
474Will prevent JJb from failing if there are any non-initialized variables used 474Will prevent JJb from failing if there are any non-initialized variables used
475and replace them with the empty string instead. 475and replace them with the empty string instead.
476 476
477.. tip::
478
479 Defaults for variables can be set by using the ``|`` character
480 ``{var|default_value}``. This is useful if we want to allow users of the
481 job-template to not have to pass a setting if there is a common default for
482 it.
483
484 Example:
485
486 .. literalinclude:: /../../tests/yamlparser/fixtures/variable_defaults.yaml
477 487
478Yaml Anchors & Aliases 488Yaml Anchors & Aliases
479^^^^^^^^^^^^^^^^^^^^^^ 489^^^^^^^^^^^^^^^^^^^^^^
diff --git a/jenkins_jobs/builder.py b/jenkins_jobs/builder.py
index 421d097..d446f38 100644
--- a/jenkins_jobs/builder.py
+++ b/jenkins_jobs/builder.py
@@ -132,12 +132,11 @@ class JenkinsManager(object):
132 self._job_format(job_name))) 132 self._job_format(job_name)))
133 self.jenkins.create_job(job_name, xml) 133 self.jenkins.create_job(job_name, xml)
134 134
135 def is_job(self, job_name): 135 def is_job(self, job_name, use_cache=True):
136 # first use cache 136 if use_cache:
137 if job_name in self.job_list: 137 if job_name in self.job_list:
138 return True 138 return True
139 139
140 # if not exists, use jenkins
141 return self.jenkins.job_exists(job_name) 140 return self.jenkins.job_exists(job_name)
142 141
143 def get_job_md5(self, job_name): 142 def get_job_md5(self, job_name):
@@ -200,7 +199,9 @@ class JenkinsManager(object):
200 keep = [] 199 keep = []
201 for job in jobs: 200 for job in jobs:
202 # python-jenkins stores the folder and name as 'fullname' 201 # python-jenkins stores the folder and name as 'fullname'
203 if job['fullname'] not in keep: 202 # Check if the job was deleted when his parent folder was deleted
203 if job['fullname'] not in keep and \
204 self.is_job(job['fullname'], use_cache=False):
204 if self.is_managed(job['fullname']): 205 if self.is_managed(job['fullname']):
205 logger.info("Removing obsolete jenkins job {0}" 206 logger.info("Removing obsolete jenkins job {0}"
206 .format(job['fullname'])) 207 .format(job['fullname']))
@@ -240,8 +241,14 @@ class JenkinsManager(object):
240 logger.debug("'{0}' has not changed".format(job.name)) 241 logger.debug("'{0}' has not changed".format(job.name))
241 return changed 242 return changed
242 243
244 def exists(self, job):
245 exists = self.jenkins.job_exists(job.name)
246 if not exists:
247 logger.debug("'{0}' does not currently exist".format(job.name))
248 return exists
249
243 def update_jobs(self, xml_jobs, output=None, n_workers=None, 250 def update_jobs(self, xml_jobs, output=None, n_workers=None,
244 config_xml=False): 251 existing_only=None, config_xml=False):
245 orig = time.time() 252 orig = time.time()
246 253
247 logger.info("Number of jobs generated: %d", len(xml_jobs)) 254 logger.info("Number of jobs generated: %d", len(xml_jobs))
@@ -293,6 +300,16 @@ class JenkinsManager(object):
293 logging.debug("Filtered for changed jobs in %ss", 300 logging.debug("Filtered for changed jobs in %ss",
294 (time.time() - step)) 301 (time.time() - step))
295 302
303 if existing_only:
304 # Filter out the jobs not already in the cache
305 logging.debug('Filtering %d jobs for existing jobs',
306 len(jobs))
307 step = time.time()
308 jobs = [job for job in jobs
309 if self.exists(job)]
310 logging.debug("Filtered for existing jobs in %ss",
311 (time.time() - step))
312
296 if not jobs: 313 if not jobs:
297 return [], 0 314 return [], 0
298 315
@@ -395,7 +412,7 @@ class JenkinsManager(object):
395 self.jenkins.create_view(view_name, xml) 412 self.jenkins.create_view(view_name, xml)
396 413
397 def update_views(self, xml_views, output=None, n_workers=None, 414 def update_views(self, xml_views, output=None, n_workers=None,
398 config_xml=False): 415 existing_only=None, config_xml=False):
399 orig = time.time() 416 orig = time.time()
400 417
401 logger.info("Number of views generated: %d", len(xml_views)) 418 logger.info("Number of views generated: %d", len(xml_views))
@@ -438,6 +455,16 @@ class JenkinsManager(object):
438 logging.debug("Filtered for changed views in %ss", 455 logging.debug("Filtered for changed views in %ss",
439 (time.time() - step)) 456 (time.time() - step))
440 457
458 if existing_only:
459 # Filter out the jobs not already in the cache
460 logging.debug('Filtering %d views for existing jobs',
461 len(views))
462 step = time.time()
463 views = [view for view in views
464 if self.exists(view)]
465 logging.debug("Filtered for existing views in %ss",
466 (time.time() - step))
467
441 if not views: 468 if not views:
442 return [], 0 469 return [], 0
443 470
diff --git a/jenkins_jobs/cli/subcommand/update.py b/jenkins_jobs/cli/subcommand/update.py
index 7f2ad7c..18ce70b 100644
--- a/jenkins_jobs/cli/subcommand/update.py
+++ b/jenkins_jobs/cli/subcommand/update.py
@@ -84,6 +84,13 @@ class UpdateSubCommand(base.BaseSubCommand):
84 default=False, 84 default=False,
85 help='update only views' 85 help='update only views'
86 ) 86 )
87 update.add_argument(
88 '--existing-only',
89 action='store_true',
90 default=False,
91 dest='existing_only',
92 help='update existing jobs only'
93 )
87 94
88 def _generate_xmljobs(self, options, jjb_config=None): 95 def _generate_xmljobs(self, options, jjb_config=None):
89 builder = JenkinsManager(jjb_config) 96 builder = JenkinsManager(jjb_config)
@@ -129,18 +136,22 @@ class UpdateSubCommand(base.BaseSubCommand):
129 136
130 if options.add_jobs: 137 if options.add_jobs:
131 jobs, num_updated_jobs = builder.update_jobs( 138 jobs, num_updated_jobs = builder.update_jobs(
132 xml_jobs, n_workers=options.n_workers) 139 xml_jobs, n_workers=options.n_workers,
140 existing_only=options.existing_only)
133 logger.info("Number of jobs updated: %d", num_updated_jobs) 141 logger.info("Number of jobs updated: %d", num_updated_jobs)
134 elif options.add_views: 142 elif options.add_views:
135 views, num_updated_views = builder.update_views( 143 views, num_updated_views = builder.update_views(
136 xml_views, n_workers=options.n_workers) 144 xml_views, n_workers=options.n_workers,
145 existing_only=options.existing_only)
137 logger.info("Number of views updated: %d", num_updated_views) 146 logger.info("Number of views updated: %d", num_updated_views)
138 else: 147 else:
139 jobs, num_updated_jobs = builder.update_jobs( 148 jobs, num_updated_jobs = builder.update_jobs(
140 xml_jobs, n_workers=options.n_workers) 149 xml_jobs, n_workers=options.n_workers,
150 existing_only=options.existing_only)
141 logger.info("Number of jobs updated: %d", num_updated_jobs) 151 logger.info("Number of jobs updated: %d", num_updated_jobs)
142 views, num_updated_views = builder.update_views( 152 views, num_updated_views = builder.update_views(
143 xml_views, n_workers=options.n_workers) 153 xml_views, n_workers=options.n_workers,
154 existing_only=options.existing_only)
144 logger.info("Number of views updated: %d", num_updated_views) 155 logger.info("Number of views updated: %d", num_updated_views)
145 156
146 keep_jobs = [job.name for job in xml_jobs] 157 keep_jobs = [job.name for job in xml_jobs]
diff --git a/jenkins_jobs/local_yaml.py b/jenkins_jobs/local_yaml.py
index c49393d..493dac0 100644
--- a/jenkins_jobs/local_yaml.py
+++ b/jenkins_jobs/local_yaml.py
@@ -18,6 +18,52 @@
18"""Custom application specific yamls tags are supported to provide 18"""Custom application specific yamls tags are supported to provide
19enhancements when reading yaml configuration. 19enhancements when reading yaml configuration.
20 20
21Action Tags
22^^^^^^^^^^^
23
24These allow manipulation of data being stored in one layout in the source
25yaml for convenience and/or clarity, to another format to be processed by
26the targeted module instead of requiring all modules in JJB being capable
27of supporting multiple input formats.
28
29The tag ``!join:`` will treat the first element of the following list as
30the delimiter to use, when joining the remaining elements into a string
31and returning a single string to be consumed by the specified module option.
32
33This allows users to maintain elements of data in a list structure for ease
34of review/maintenance, and have the yaml parser convert it to a string for
35consumption as any argument for modules. The main expected use case is to
36allow for generic plugin data such as shell properties to be populated from
37a list construct which the yaml parser converts to a single string, instead
38of trying to support this within the module code which would require a
39templating engine similar to Jinja.
40
41Generic Example:
42
43 .. literalinclude:: /../../tests/localyaml/fixtures/joinlists.yaml
44
45
46Environment Inject:
47
48 .. literalinclude:: /../../tests/yamlparser/fixtures/string_join.yaml
49
50
51While this mechanism can also be used items where delimiters are supported by
52the module, that should be considered a bug that the existing code doesn't
53handle being provided a list and delimiter to perform the correct conversion
54for you. Should you discover a module that takes arguments with delimiters and
55the existing JJB codebase does not handle accepting lists, then this can be
56used as a temporary solution in place of using very long strings:
57
58Extended Params Example:
59
60 .. literalinclude::
61 /../../tests/parameters/fixtures/extended-choice-param-full.yaml
62
63
64Inclusion Tags
65^^^^^^^^^^^^^^
66
21These allow inclusion of arbitrary files as a method of having blocks of data 67These allow inclusion of arbitrary files as a method of having blocks of data
22managed separately to the yaml job configurations. A specific usage of this is 68managed separately to the yaml job configurations. A specific usage of this is
23inlining scripts contained in separate files, although such tags may also be 69inlining scripts contained in separate files, although such tags may also be
@@ -327,6 +373,25 @@ class J2String(BaseYAMLObject):
327 return Jinja2Loader(node.value, loader.search_path) 373 return Jinja2Loader(node.value, loader.search_path)
328 374
329 375
376class YamlListJoin(BaseYAMLObject):
377 yaml_tag = u'!join:'
378
379 @classmethod
380 def from_yaml(cls, loader, node):
381 if isinstance(node, yaml.SequenceNode):
382 delimiter = node.value[0].value
383 if not isinstance(node.value[1], yaml.SequenceNode):
384 raise yaml.constructor.ConstructorError(
385 None, None, "expected sequence node for join data, but "
386 "found %s" % node.value[1].id, node.start_mark)
387
388 return delimiter.join((v.value for v in node.value[1].value))
389 else:
390 raise yaml.constructor.ConstructorError(
391 None, None, "expected sequence node, but found %s" % node.id,
392 node.start_mark)
393
394
330class YamlInclude(BaseYAMLObject): 395class YamlInclude(BaseYAMLObject):
331 yaml_tag = u'!include:' 396 yaml_tag = u'!include:'
332 397
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index 729d93e..98bdbea 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -798,7 +798,7 @@ def http_request(registry, xml_parent, data):
798 being called (default false) 798 being called (default false)
799 :arg str valid-response-codes: Configure response code to mark an 799 :arg str valid-response-codes: Configure response code to mark an
800 execution as success. You can configure simple code such as "200" 800 execution as success. You can configure simple code such as "200"
801 or multiple codes separeted by comma(',') e.g. "200,404,500" 801 or multiple codes separated by comma(',') e.g. "200,404,500"
802 Interval of codes should be in format From:To e.g. "100:399". 802 Interval of codes should be in format From:To e.g. "100:399".
803 The default (as if empty) is to fail to 4xx and 5xx. 803 The default (as if empty) is to fail to 4xx and 5xx.
804 That means success from 100 to 399 "100:399" 804 That means success from 100 to 399 "100:399"
@@ -1341,9 +1341,9 @@ def conditional_step(registry, xml_parent, data):
1341 :SCRIPT_CAUSE: build was triggered by a script 1341 :SCRIPT_CAUSE: build was triggered by a script
1342 (ScriptTrigger Plugin) 1342 (ScriptTrigger Plugin)
1343 :BUILDRESULT_CAUSE: build was triggered by a 1343 :BUILDRESULT_CAUSE: build was triggered by a
1344 result of an other job (BuildResultTrigger Plugin) 1344 result of another job (BuildResultTrigger Plugin)
1345 :exclusive-cause: (bool) There might by multiple 1345 :exclusive-cause: (bool) There might by multiple
1346 casues causing a build to be triggered, with 1346 causes causing a build to be triggered, with
1347 this true, the cause must be the only one 1347 this true, the cause must be the only one
1348 causing this build this build to be triggered. 1348 causing this build this build to be triggered.
1349 (default false) 1349 (default false)
@@ -2171,7 +2171,7 @@ def sbt(registry, xml_parent, data):
2171 2171
2172def critical_block_start(registry, xml_parent, data): 2172def critical_block_start(registry, xml_parent, data):
2173 """yaml: critical-block-start 2173 """yaml: critical-block-start
2174 Designate the start of a critical block. Must be used in conjuction with 2174 Designate the start of a critical block. Must be used in conjunction with
2175 critical-block-end. 2175 critical-block-end.
2176 2176
2177 Must also add a build wrapper (exclusion), specifying the resources that 2177 Must also add a build wrapper (exclusion), specifying the resources that
@@ -2192,7 +2192,7 @@ def critical_block_start(registry, xml_parent, data):
2192 2192
2193def critical_block_end(registry, xml_parent, data): 2193def critical_block_end(registry, xml_parent, data):
2194 """yaml: critical-block-end 2194 """yaml: critical-block-end
2195 Designate the end of a critical block. Must be used in conjuction with 2195 Designate the end of a critical block. Must be used in conjunction with
2196 critical-block-start. 2196 critical-block-start.
2197 2197
2198 Must also add a build wrapper (exclusion), specifying the resources that 2198 Must also add a build wrapper (exclusion), specifying the resources that
@@ -2553,7 +2553,7 @@ def tox(registry, xml_parent, data):
2553 2553
2554def managed_script(registry, xml_parent, data): 2554def managed_script(registry, xml_parent, data):
2555 """yaml: managed-script 2555 """yaml: managed-script
2556 This step allows to reference and execute a centrally managed 2556 This step allows you to reference and execute a centrally managed
2557 script within your build. Requires the Jenkins 2557 script within your build. Requires the Jenkins
2558 :jenkins-wiki:`Managed Script Plugin <Managed+Script+Plugin>`. 2558 :jenkins-wiki:`Managed Script Plugin <Managed+Script+Plugin>`.
2559 2559
@@ -3012,7 +3012,7 @@ def sonar(registry, xml_parent, data):
3012 3012
3013def xcode(registry, xml_parent, data): 3013def xcode(registry, xml_parent, data):
3014 """yaml: xcode 3014 """yaml: xcode
3015 This step allows to execute an xcode build step. Requires the Jenkins 3015 This step allows you to execute an xcode build step. Requires the Jenkins
3016 :jenkins-wiki:`Xcode Plugin <Xcode+Plugin>`. 3016 :jenkins-wiki:`Xcode Plugin <Xcode+Plugin>`.
3017 3017
3018 :arg str developer-profile: the jenkins credential id for a 3018 :arg str developer-profile: the jenkins credential id for a
@@ -3963,7 +3963,7 @@ def nexus_artifact_uploader(registry, xml_parent, data):
3963 3963
3964def ansible_playbook(parser, xml_parent, data): 3964def ansible_playbook(parser, xml_parent, data):
3965 """yaml: ansible-playbook 3965 """yaml: ansible-playbook
3966 This plugin allows to execute Ansible tasks as a job build step. 3966 This plugin allows you to execute Ansible tasks as a job build step.
3967 Requires the Jenkins :jenkins-wiki:`Ansible Plugin <Ansible+Plugin>`. 3967 Requires the Jenkins :jenkins-wiki:`Ansible Plugin <Ansible+Plugin>`.
3968 3968
3969 :arg str playbook: Path to the ansible playbook file. The path can be 3969 :arg str playbook: Path to the ansible playbook file. The path can be
@@ -4001,7 +4001,7 @@ def ansible_playbook(parser, xml_parent, data):
4001 empty. (default '') 4001 empty. (default '')
4002 :arg bool unbuffered-output: Skip standard output buffering for the ansible 4002 :arg bool unbuffered-output: Skip standard output buffering for the ansible
4003 process. The ansible output is directly rendered into the Jenkins 4003 process. The ansible output is directly rendered into the Jenkins
4004 console. This option can be usefull for long running operations. 4004 console. This option can be useful for long running operations.
4005 (default true) 4005 (default true)
4006 :arg bool colorized-output: Check this box to allow ansible to render ANSI 4006 :arg bool colorized-output: Check this box to allow ansible to render ANSI
4007 color codes in the Jenkins console. (default false) 4007 color codes in the Jenkins console. (default false)
@@ -4114,7 +4114,7 @@ def ansible_playbook(parser, xml_parent, data):
4114 4114
4115def nodejs(parser, xml_parent, data): 4115def nodejs(parser, xml_parent, data):
4116 """yaml: nodejs 4116 """yaml: nodejs
4117 This plugin allows to execute NodeJS scripts as a job build step. 4117 This plugin allows you to execute NodeJS scripts as a job build step.
4118 Requires the Jenkins :jenkins-wiki:`NodeJS Plugin <NodeJS+Plugin>`. 4118 Requires the Jenkins :jenkins-wiki:`NodeJS Plugin <NodeJS+Plugin>`.
4119 4119
4120 :arg str name: NodeJS installation name 4120 :arg str name: NodeJS installation name
diff --git a/jenkins_jobs/modules/parameters.py b/jenkins_jobs/modules/parameters.py
index 109a46a..9fa1e89 100644
--- a/jenkins_jobs/modules/parameters.py
+++ b/jenkins_jobs/modules/parameters.py
@@ -307,11 +307,11 @@ def credentials_param(registry, xml_parent, data):
307 :arg string default: default credentials ID (optional) 307 :arg string default: default credentials ID (optional)
308 :arg str description: a description of the parameter (optional) 308 :arg str description: a description of the parameter (optional)
309 309
310 Example:: 310 Example:
311 311
312 .. literalinclude:: 312 .. literalinclude:: \
313 /../../tests/parameters/fixtures/credentials-param001.yaml 313 /../../tests/parameters/fixtures/credentials-param001.yaml
314 :language: yaml 314 :language: yaml
315 315
316 """ 316 """
317 cred_impl_types = { 317 cred_impl_types = {
@@ -888,7 +888,7 @@ def random_string_param(registry, xml_parent, data):
888 888
889def git_parameter_param(registry, xml_parent, data): 889def git_parameter_param(registry, xml_parent, data):
890 """yaml: git-parameter 890 """yaml: git-parameter
891 This parameter allows to select a git tag, branch or revision number as 891 This parameter allows you to select a git tag, branch or revision number as
892 parameter in Parametrized builds. 892 parameter in Parametrized builds.
893 Requires the Jenkins :jenkins-wiki:`Git Parameter Plugin 893 Requires the Jenkins :jenkins-wiki:`Git Parameter Plugin
894 <Git+Parameter+Plugin>`. 894 <Git+Parameter+Plugin>`.
diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py
index ae794f5..ab521ea 100644
--- a/jenkins_jobs/modules/properties.py
+++ b/jenkins_jobs/modules/properties.py
@@ -558,28 +558,19 @@ def build_blocker(registry, xml_parent, data):
558 raise JenkinsJobsException('blocking-jobs field is missing') 558 raise JenkinsJobsException('blocking-jobs field is missing')
559 elif data.get('blocking-jobs', None) is None: 559 elif data.get('blocking-jobs', None) is None:
560 raise JenkinsJobsException('blocking-jobs list must not be empty') 560 raise JenkinsJobsException('blocking-jobs list must not be empty')
561 XML.SubElement(blocker, 'useBuildBlocker').text = str( 561
562 data.get('use-build-blocker', True)).lower()
563 jobs = '' 562 jobs = ''
564 for value in data['blocking-jobs']: 563 for value in data['blocking-jobs']:
565 jobs = jobs + value + '\n' 564 jobs = jobs + value + '\n'
566 XML.SubElement(blocker, 'blockingJobs').text = jobs 565 mapping = [
567 566 ('use-build-blocker', 'useBuildBlocker', True),
568 block_level_list = ('GLOBAL', 'NODE') 567 ('', 'blockingJobs', jobs),
569 block_level = data.get('block-level', 'GLOBAL') 568 ('blocking-level', 'blockLevel', 'GLOBAL', ('GLOBAL', 'NODE')),
570 if block_level not in block_level_list: 569 ('queue-scanning', 'scanQueueFor', 'DISABLED',
571 raise InvalidAttributeError('block-level', 570 ('DISABLED', 'ALL', 'BUILDABLE')),
572 block_level, 571 ]
573 block_level_list) 572 helpers.convert_mapping_to_xml(
574 XML.SubElement(blocker, 'blockLevel').text = block_level 573 blocker, data, mapping, fail_required=True)
575
576 queue_scanning_list = ('DISABLED', 'ALL', 'BUILDABLE')
577 queue_scanning = data.get('queue-scanning', 'DISABLED')
578 if queue_scanning not in queue_scanning_list:
579 raise InvalidAttributeError('queue-scanning',
580 queue_scanning,
581 queue_scanning_list)
582 XML.SubElement(blocker, 'scanQueueFor').text = queue_scanning
583 574
584 575
585def copyartifact(registry, xml_parent, data): 576def copyartifact(registry, xml_parent, data):
@@ -796,7 +787,7 @@ def slack(registry, xml_parent, data):
796 :arg bool include-custom-message: Include a custom message into the 787 :arg bool include-custom-message: Include a custom message into the
797 notification. (default false) 788 notification. (default false)
798 :arg str custom-message: Custom message to be included. (default '') 789 :arg str custom-message: Custom message to be included. (default '')
799 :arg str room: A comma seperated list of rooms / channels to send 790 :arg str room: A comma separated list of rooms / channels to send
800 the notifications to. (default '') 791 the notifications to. (default '')
801 792
802 Example: 793 Example:
@@ -915,7 +906,7 @@ def build_discarder(registry, xml_parent, data):
915 906
916def slave_prerequisites(registry, xml_parent, data): 907def slave_prerequisites(registry, xml_parent, data):
917 """yaml: slave-prerequisites 908 """yaml: slave-prerequisites
918 This plugin allows to check prerequisites on slave before 909 This plugin allows you to check prerequisites on slave before
919 a job can run a build on it 910 a job can run a build on it
920 911
921 Requires the Jenkins :jenkins-wiki:`Slave Prerequisites Plugin 912 Requires the Jenkins :jenkins-wiki:`Slave Prerequisites Plugin
@@ -953,7 +944,7 @@ def slave_prerequisites(registry, xml_parent, data):
953 944
954def groovy_label(registry, xml_parent, data): 945def groovy_label(registry, xml_parent, data):
955 """yaml: groovy-label 946 """yaml: groovy-label
956 This plugin allows to use Groovy script to restrict where this project 947 This plugin allows you to use Groovy script to restrict where this project
957 can be run. 948 can be run.
958 949
959 Requires the Jenkins :jenkins-wiki:`Groovy Label Assignment Plugin 950 Requires the Jenkins :jenkins-wiki:`Groovy Label Assignment Plugin
diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py
index a2f7722..11f2bdc 100644
--- a/jenkins_jobs/modules/publishers.py
+++ b/jenkins_jobs/modules/publishers.py
@@ -121,7 +121,7 @@ def archive(registry, xml_parent, data):
121 :arg bool only-if-success: archive artifacts only if build is successful 121 :arg bool only-if-success: archive artifacts only if build is successful
122 (default false) 122 (default false)
123 :arg bool fingerprint: fingerprint all archived artifacts (default false) 123 :arg bool fingerprint: fingerprint all archived artifacts (default false)
124 :arg bool default-excludes: This option allows to enable or disable the 124 :arg bool default-excludes: This option allows you to enable or disable the
125 default Ant exclusions. (default true) 125 default Ant exclusions. (default true)
126 :arg bool case-sensitive: Treat include and exclude patterns as case 126 :arg bool case-sensitive: Treat include and exclude patterns as case
127 sensitive. (default true) 127 sensitive. (default true)
@@ -148,8 +148,8 @@ def archive(registry, xml_parent, data):
148 148
149def blame_upstream(registry, xml_parent, data): 149def blame_upstream(registry, xml_parent, data):
150 """yaml: blame-upstream 150 """yaml: blame-upstream
151 Notify upstream commiters when build fails 151 Notify upstream committers when build fails
152 Requires the Jenkins :jenkins-wiki:`Blame upstream commiters Plugin 152 Requires the Jenkins :jenkins-wiki:`Blame upstream committers Plugin
153 <Blame+Upstream+Committers+Plugin>`. 153 <Blame+Upstream+Committers+Plugin>`.
154 154
155 Example: 155 Example:
@@ -268,7 +268,7 @@ def hue_light(registry, xml_parent, data):
268 :arg int light-id: ID of light. Define multiple lights by a comma as a 268 :arg int light-id: ID of light. Define multiple lights by a comma as a
269 separator (required) 269 separator (required)
270 :arg string pre-build: Colour of building state (default 'blue') 270 :arg string pre-build: Colour of building state (default 'blue')
271 :arg string good-build: Colour of succesful state (default 'green') 271 :arg string good-build: Colour of successful state (default 'green')
272 :arg string unstable-build: Colour of unstable state (default 'yellow') 272 :arg string unstable-build: Colour of unstable state (default 'yellow')
273 :arg string bad-build: Colour of unsuccessful state (default 'red') 273 :arg string bad-build: Colour of unsuccessful state (default 'red')
274 274
@@ -3678,7 +3678,7 @@ def postbuildscript(registry, xml_parent, data):
3678 xml_parent, 3678 xml_parent,
3679 'org.jenkinsci.plugins.postbuildscript.PostBuildScript') 3679 'org.jenkinsci.plugins.postbuildscript.PostBuildScript')
3680 3680
3681 info = registry.get_plugin_info('Jenkins PostBuildScript Plugin') 3681 info = registry.get_plugin_info('postbuildscript')
3682 # Note: Assume latest version of plugin is preferred config format 3682 # Note: Assume latest version of plugin is preferred config format
3683 version = pkg_resources.parse_version( 3683 version = pkg_resources.parse_version(
3684 info.get('version', str(sys.maxsize))) 3684 info.get('version', str(sys.maxsize)))
@@ -4327,7 +4327,7 @@ def plot(registry, xml_parent, data):
4327 filename, same behaviour as the Jenkins Plot plugin) 4327 filename, same behaviour as the Jenkins Plot plugin)
4328 :arg list series: list data series definitions 4328 :arg list series: list data series definitions
4329 4329
4330 :Serie: * **file** (`str`) : files to include 4330 :Series: * **file** (`str`) : files to include
4331 * **inclusion-flag** filtering mode for CSV files. Possible 4331 * **inclusion-flag** filtering mode for CSV files. Possible
4332 values are: 4332 values are:
4333 4333
@@ -6266,7 +6266,7 @@ def flowdock(registry, xml_parent, data):
6266 6266
6267 :arg str token: API token for the targeted flow. 6267 :arg str token: API token for the targeted flow.
6268 (required) 6268 (required)
6269 :arg str tags: Comma-separated list of tags to incude in message 6269 :arg str tags: Comma-separated list of tags to include in message
6270 (default "") 6270 (default "")
6271 :arg bool chat-notification: Send chat notification when build fails 6271 :arg bool chat-notification: Send chat notification when build fails
6272 (default true) 6272 (default true)
@@ -6330,9 +6330,9 @@ def clamav(registry, xml_parent, data):
6330 Check files with ClamAV, an open source antivirus engine. 6330 Check files with ClamAV, an open source antivirus engine.
6331 Requires the Jenkins :jenkins-wiki:`ClamAV Plugin <ClamAV+Plugin>`. 6331 Requires the Jenkins :jenkins-wiki:`ClamAV Plugin <ClamAV+Plugin>`.
6332 6332
6333 :arg str includes: Comma seperated list of files that should be scanned. 6333 :arg str includes: Comma separated list of files that should be scanned.
6334 Must be set for ClamAV to check for artifacts. (default '') 6334 Must be set for ClamAV to check for artifacts. (default '')
6335 :arg str excludes: Comma seperated list of files that should be ignored 6335 :arg str excludes: Comma separated list of files that should be ignored
6336 (default '') 6336 (default '')
6337 6337
6338 Full Example: 6338 Full Example:
@@ -6378,7 +6378,7 @@ def testselector(registry, xml_parent, data):
6378 (default "") 6378 (default "")
6379 :arg str show-fields: Shown in the tests tree 6379 :arg str show-fields: Shown in the tests tree
6380 (default "") 6380 (default "")
6381 :arg str multiplicity-field: Amount of times the test should run 6381 :arg str multiplicity-field: Number of times the test should run
6382 (default "") 6382 (default "")
6383 6383
6384 Example: 6384 Example:
@@ -6616,7 +6616,7 @@ def slack(registry, xml_parent, data):
6616 (default '') 6616 (default '')
6617 :arg str build-server-url: Specify the URL for your server installation. 6617 :arg str build-server-url: Specify the URL for your server installation.
6618 (default '/') 6618 (default '/')
6619 :arg str room: A comma seperated list of rooms / channels to post the 6619 :arg str room: A comma separated list of rooms / channels to post the
6620 notifications to. (default '') 6620 notifications to. (default '')
6621 :arg bool notify-start: Send notification when the job starts (>=2.0). 6621 :arg bool notify-start: Send notification when the job starts (>=2.0).
6622 (default false) 6622 (default false)
@@ -7126,8 +7126,8 @@ def tasks(registry, xml_parent, data):
7126 should ensure that all new warnings will be finally fixed in subsequent 7126 should ensure that all new warnings will be finally fixed in subsequent
7127 builds. Depends on ``compute-new-warnings`` option. (default false) 7127 builds. Depends on ``compute-new-warnings`` option. (default false)
7128 :arg bool only-use-stable-as-ref: Use the last stable build as the 7128 :arg bool only-use-stable-as-ref: Use the last stable build as the
7129 reference to compute the number of new warnings against. This allows to 7129 reference to compute the number of new warnings against. This allows
7130 ignore interim unstable builds for which the number of warnings 7130 you to ignore interim unstable builds for which the number of warnings
7131 decreased. Note that the last stable build is evaluated only by 7131 decreased. Note that the last stable build is evaluated only by
7132 inspecting the unit test failures. The static analysis results are not 7132 inspecting the unit test failures. The static analysis results are not
7133 considered. Depends on ``compute-new-warnings`` option. (default false) 7133 considered. Depends on ``compute-new-warnings`` option. (default false)
diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py
index d5f3ba1..b8f5d31 100644
--- a/jenkins_jobs/modules/triggers.py
+++ b/jenkins_jobs/modules/triggers.py
@@ -1225,6 +1225,10 @@ def gitlab(registry, xml_parent, data):
1225 :arg bool trigger-push: Build on Push Events (default true) 1225 :arg bool trigger-push: Build on Push Events (default true)
1226 :arg bool trigger-merge-request: Build on Merge Request Events (default 1226 :arg bool trigger-merge-request: Build on Merge Request Events (default
1227 true) 1227 true)
1228 :arg bool trigger-accepted-merge-request: Build on Accepted Merge Request
1229 Events (>= 1.4.6) (default false)
1230 :arg bool trigger-closed-merge-request: Build on Closed Merge Request
1231 Events (>= 1.4.6) (default false)
1228 :arg str trigger-open-merge-request-push: Rebuild open Merge Requests 1232 :arg str trigger-open-merge-request-push: Rebuild open Merge Requests
1229 on Push Events. 1233 on Push Events.
1230 1234
@@ -1279,7 +1283,7 @@ def gitlab(registry, xml_parent, data):
1279 **include-branches** and **exclude-branches** lists. 1283 **include-branches** and **exclude-branches** lists.
1280 1284
1281 RegexBasedFilter Filter branches by regex 1285 RegexBasedFilter Filter branches by regex
1282 The target branch regex allows to limit the 1286 The target branch regex allows you to limit the
1283 execution of this job to certain branches. Any 1287 execution of this job to certain branches. Any
1284 branch matching the specified pattern in 1288 branch matching the specified pattern in
1285 **target-branch-regex** triggers the job. No 1289 **target-branch-regex** triggers the job. No
@@ -1343,6 +1347,9 @@ def gitlab(registry, xml_parent, data):
1343 mapping = [ 1347 mapping = [
1344 ('trigger-push', 'triggerOnPush', True), 1348 ('trigger-push', 'triggerOnPush', True),
1345 ('trigger-merge-request', 'triggerOnMergeRequest', True), 1349 ('trigger-merge-request', 'triggerOnMergeRequest', True),
1350 ('trigger-accepted-merge-request', 'triggerOnAcceptedMergeRequest',
1351 False),
1352 ('trigger-closed-merge-request', 'triggerOnClosedMergeRequest', False),
1346 ('trigger-note', 'triggerOnNoteRequest', True), 1353 ('trigger-note', 'triggerOnNoteRequest', True),
1347 ('note-regex', 'noteRegex', 'Jenkins please retry a build'), 1354 ('note-regex', 'noteRegex', 'Jenkins please retry a build'),
1348 ('ci-skip', 'ciSkip', True), 1355 ('ci-skip', 'ciSkip', True),
@@ -1548,7 +1555,7 @@ def monitor_files(registry, xml_parent, data):
1548 1555
1549 :File: 1556 :File:
1550 * **path** (`str`) -- File path to monitor. You can use a pattern 1557 * **path** (`str`) -- File path to monitor. You can use a pattern
1551 that specifies a set of files if you dont know the real file 1558 that specifies a set of files if you don't know the real file
1552 path. (required) 1559 path. (required)
1553 * **strategy** (`str`) -- Choose your strategy if there is more 1560 * **strategy** (`str`) -- Choose your strategy if there is more
1554 than one matching file. Can be one of Ignore file ('IGNORE') or 1561 than one matching file. Can be one of Ignore file ('IGNORE') or
@@ -1875,6 +1882,106 @@ def parameterized_timer(parser, xml_parent, data):
1875 convert_mapping_to_xml(param_timer, data, mapping, fail_required=True) 1882 convert_mapping_to_xml(param_timer, data, mapping, fail_required=True)
1876 1883
1877 1884
1885def jira_changelog(registry, xml_parent, data):
1886 """yaml: jira-changelog
1887 Sets up a trigger that listens to JIRA issue changes
1888 Requires the Jenkins :jenkins-wiki:`JIRA Trigger Plugin
1889 <JIRA+Trigger+Plugin>`.
1890
1891 :arg str jql-filter: Must match updated issues to trigger a build.
1892 (default '')
1893 :arg list changelog-matchers:
1894
1895 :Custom Field Matcher:
1896 * **custom-field-name** (`str`) -- The custom field
1897 name that has been changed during the issue update.
1898 (default '')
1899 * **compare-new-value** (`bool`) -- Compare the
1900 new value of the updated field. (default false)
1901 * **new-value** (`str`) -- The new value of the updated field.
1902 (default '')
1903 * **compare-old-value** (`bool`) -- Compare the
1904 old value of the updated field. (default false)
1905 * **old-value** (`str`) -- The value
1906 before the field is updated. (default '')
1907
1908 :JIRA Field Matcher:
1909 * **jira-field-ID** (`str`) -- The JIRA Field ID that
1910 has been changed during the issue update. (default '')
1911 * **compare-new-value** (`bool`) -- Compare the new value
1912 of the updated field. (default false)
1913 * **new-value** (`str`) -- The new value of the updated field.
1914 (default '')
1915 * **compare-old-value** (`bool`) -- Compare the old value
1916 of the updated field. (default false)
1917 * **old-value** (`str`) -- The value before
1918 the field is updated. (default '')
1919
1920 :arg list parameter-mapping:
1921
1922 :Issue Attribute Path:
1923 * **jenkins-parameter** (`str`) -- Jenkins parameter name
1924 (default '')
1925 * **issue-attribute-path** (`str`) -- Attribute path (default '')
1926
1927 Minimal Example:
1928
1929 .. literalinclude::
1930 /../../tests/triggers/fixtures/jira-changelog-minimal.yaml
1931 :language: yaml
1932
1933 Full Example:
1934
1935 .. literalinclude::
1936 /../../tests/triggers/fixtures/jira-changelog-full.yaml
1937 :language: yaml
1938 """
1939 jcht = XML.SubElement(xml_parent, 'com.ceilfors.jenkins.plugins.'
1940 'jiratrigger.JiraChangelogTrigger')
1941 jcht.set('plugin', 'jira-trigger')
1942
1943 mapping = [('jql-filter', 'jqlFilter', '')]
1944 convert_mapping_to_xml(jcht, data, mapping, fail_required=True)
1945
1946 changelog = XML.SubElement(jcht, 'changelogMatchers')
1947 mappings = [
1948 ('field', 'field', ''),
1949 ('new-value', 'newValue', ''),
1950 ('old-value', 'oldValue', ''),
1951 ('compare-new-value', 'comparingNewValue', False),
1952 ('compare-old-value', 'comparingOldValue', False),
1953 ]
1954 for matcher in data.get('changelog-matchers', []):
1955
1956 fieldtype = matcher.get('field-type')
1957 if fieldtype == 'CUSTOM':
1958 parent_tag = XML.SubElement(changelog, 'com.ceilfors.jenkins.'
1959 'plugins.jiratrigger.changelog.'
1960 'CustomFieldChangelogMatcher')
1961 XML.SubElement(parent_tag, 'fieldType').text = 'CUSTOM'
1962
1963 elif fieldtype == 'JIRA':
1964 parent_tag = XML.SubElement(changelog, 'com.ceilfors.jenkins.'
1965 'plugins.jiratrigger.changelog.'
1966 'JiraFieldChangelogMatcher')
1967 XML.SubElement(parent_tag, 'fieldType').text = 'JIRA'
1968
1969 convert_mapping_to_xml(parent_tag, matcher,
1970 mappings, fail_required=True)
1971
1972 param = XML.SubElement(jcht, 'parameterMappings')
1973 parameter_mappings = [
1974 ('jenkins-parameter', 'jenkinsParameter', ''),
1975 ('issue-attribute-path', 'issueAttributePath', ''),
1976 ]
1977 for parameter in data.get('parameter-mapping', []):
1978 parent = XML.SubElement(param, 'com.ceilfors.jenkins.plugins.'
1979 'jiratrigger.parameter.'
1980 'IssueAttributePathParameterMapping')
1981 convert_mapping_to_xml(
1982 parent, parameter, parameter_mappings, fail_required=True)
1983
1984
1878def jira_comment_trigger(registry, xml_parent, data): 1985def jira_comment_trigger(registry, xml_parent, data):
1879 """yaml: jira-comment-trigger 1986 """yaml: jira-comment-trigger
1880 Trigger builds when a comment is added to JIRA. 1987 Trigger builds when a comment is added to JIRA.
diff --git a/jenkins_jobs/modules/view_list.py b/jenkins_jobs/modules/view_list.py
index e657b3e..945fb31 100644
--- a/jenkins_jobs/modules/view_list.py
+++ b/jenkins_jobs/modules/view_list.py
@@ -31,50 +31,177 @@ to the :ref:`view_list` definition.
31 :jenkins-wiki:`View Job Filters <View+Job+Filters>` 31 :jenkins-wiki:`View Job Filters <View+Job+Filters>`
32 32
33 * **most-recent** (`dict`) 33 * **most-recent** (`dict`)
34 :most-recent: * **max-to-include** (`int`): Maximum number of jobs 34 :most-recent:
35 to include. (default 0) 35 * **max-to-include** (`int`): Maximum number of jobs
36 * **check-start-time** (`bool`): Check job start 36 to include. (default 0)
37 time. (default false) 37 * **check-start-time** (`bool`): Check job start
38 time. (default false)
38 39
39 * **build-duration** (`dict`) 40 * **build-duration** (`dict`)
40 :build-duration: * **match-type** ('str'): Jobs that match a filter 41 :build-duration:
41 to include. (default includeMatched) 42 * **match-type** ('str'): Jobs that match a filter
42 * **build-duration-type** ('str'): Duration of the 43 to include. (default includeMatched)
43 build. (default Latest) 44 * **build-duration-type** ('str'): Duration of the
44 * **amount-type**: ('str'): Duration in hours, 45 build. (default Latest)
45 days or builds. (default Hours) 46 * **amount-type**: ('str'): Duration in hours,
46 * **amount**: ('int'): How far back to check. 47 days or builds. (default Hours)
47 (default 0) 48 * **amount**: ('int'): How far back to check.
48 * **less-than**: ('bool'): Check build duration 49 (default 0)
49 less than or more than. (default True) 50 * **less-than**: ('bool'): Check build duration
50 * **build-duration-minutes**: ('int'): Build 51 less than or more than. (default True)
51 duration minutes. (default 0) 52 * **build-duration-minutes**: ('int'): Build
53 duration minutes. (default 0)
52 54
53 * **build-trend** (`dict`) 55 * **build-trend** (`dict`)
54 :build-trend: * **match-type** ('str'): Jobs that match a filter 56 :build-trend:
55 to include. (default includeMatched) 57 * **match-type** ('str'): Jobs that match a filter
56 * **build-trend-type** ('str'): Duration of the 58 to include. (default includeMatched)
57 build. (default Latest) 59 * **build-trend-type** ('str'): Duration of the
58 * **amount-type**: ('str'): Duration in hours, 60 build. (default Latest)
59 days or builds. (default Hours) 61 * **amount-type**: ('str'): Duration in hours,
60 * **amount**: ('int'): How far back to check. 62 days or builds. (default Hours)
61 (default 0) 63 * **amount**: ('int'): How far back to check.
62 * **status**: ('str'): Job status. 64 (default 0)
63 (default Completed) 65 * **status**: ('str'): Job status.
66 (default Completed)
64 67
65 * **job-status** (`dict`) 68 * **job-status** (`dict`)
66 :job-status: * **match-type** ('str'): Jobs that match a filter 69 :job-status:
67 to include. (default includeMatched) 70 * **match-type** ('str'): Jobs that match a filter
68 * **unstable** ('bool'): Jobs with status 71 to include. (default includeMatched)
69 unstable. (default False) 72 * **unstable** ('bool'): Jobs with status
70 * **failed** ('bool'): Jobs with status 73 unstable. (default False)
71 failed. (default False) 74 * **failed** ('bool'): Jobs with status
72 * **aborted** ('bool'): Jobs with status 75 failed. (default False)
73 aborted. (default False) 76 * **aborted** ('bool'): Jobs with status
74 * **disabled** ('bool'): Jobs with status 77 aborted. (default False)
75 disabled. (default False) 78 * **disabled** ('bool'): Jobs with status
76 * **stable** ('bool'): Jobs with status 79 disabled. (default False)
77 stable. (default False) 80 * **stable** ('bool'): Jobs with status
81 stable. (default False)
82
83 * **fallback** (`dict`)
84 :fallback:
85 * **fallback-type** ('str'): Fallback type to include/exclude
86 for all jobs in a view, if no jobs have been included by
87 previous filters. (default REMOVE_ALL_IF_ALL_INCLUDED)
88
89 * **build-status** (`dict`)
90 :build-status:
91 * **match-type** ('str'): Jobs that match a filter
92 to include. (default includeMatched)
93 * **never-built** ('bool'): Jobs that are never
94 built. (default False)
95 * **building** ('bool'): Jobs that are being
96 built. (default False)
97 * **in-build-queue** ('bool'): Jobs that are in
98 the build queue. (default False)
99
100 * **user-relevence** (`dict`)
101 :user-relevence:
102 * **match-type** ('str'): Jobs that match a filter
103 to include. (default includeMatched)
104 * **build-count** ('str'): Count of builds.
105 (default AtLeastOne)
106 * **amount-type**: ('str'): Duration in hours,
107 days or builds. (default Hours)
108 * **amount**: ('int'): How far back to check.
109 (default 0)
110 * **match-user-id** ('bool'): Jobs matching
111 user-id. (default False)
112 * **match-user-fullname** ('bool'): Jobs
113 matching user fullname. (default False)
114 * **ignore-case** ('bool'): Ignore case.
115 (default False)
116 * **ignore-whitespace** ('bool'): Ignore
117 whitespace. (default False)
118 * **ignore-non-alphaNumeric** ('bool'): Ignore
119 non-alphaNumeric. (default False)
120 * **match-builder** ('bool'): Jobs matching
121 builder. (default False)
122 * **match-email** ('bool'): Jobs matching
123 email. (default False)
124 * **match-scm-changes** ('bool'): Jobs matching
125 scm changes. (default False)
126
127 * **regex-job** (`dict`)
128 :regex-job:
129 * **match-type** ('str'): Jobs that match a filter
130 to include. (default includeMatched)
131 * **regex-name** ('str'): Regular expression name.
132 (default '')
133 * **regex** ('str'): Regular expression. (default '')
134
135 * **job-tpye** (`dict`)
136 :job-type:
137 * **match-type** ('str'): Jobs that match a filter to include.
138 (default includeMatched)
139 * **job-type** ('str'): Type of Job.
140 (default hudson.model.FreeStyleProject)
141
142 * **parameter** (`dict`)
143 :parameter:
144 * **match-type** ('str'): Jobs that match a filter to include.
145 (default includeMatched)
146 * **name** ('str'): Job name to match. (default '')
147 * **value** ('str'): Value to match. (default '')
148 * **desc** ('str'): Description to match. (default '')
149 * **use-default-value** ('bool'): Use default value.
150 (default False)
151 * **match-builds-in-progress** ('bool'): Match build in
152 progress. (default False)
153 * **match-all-builds** ('bool'): Match all builds.
154 (default False)
155 * **max-builds-to-match** ('int'): Maximum builds to match.
156 (default 0)
157
158 * **other-views** (`dict`)
159 :other-views:
160 * **match-type** ('str'): Jobs that match a filter
161 to include. (default includeMatched)
162 * **view-name** ('str'): View name.
163 (default select a view other than this one)
164
165 * **scm** (`dict`)
166 :scm:
167 * **match-type** ('str'): Jobs that match a filter to include.
168 (default includeMatched)
169 * **scm-type** ('str'): Type of SCM.
170 (default hudson.scm.NullSCM)
171
172 * **secured-job** (`dict`)
173 :secured-job:
174 * **match-type** ('str'): Jobs that match a filter
175 to include. (default includeMatched)
176
177 * **user-permissions** (`dict`)
178 :user-permissions:
179 * **match-type** ('str'): Jobs that match a filter to include.
180 (default includeMatched)
181 * **configure** ('bool'): User with configure permissions.
182 (default false)
183 * **amount-type**: ('bool'): User with build permissions.
184 (default false)
185 * **amount**: ('bool'): User with workspace permissions.
186 (default false)
187 * **permission-check**: ('str'): Match user permissions.
188 (default MustMatchAll)
189
190 * **upstream-downstream** (`dict`)
191 :upstream-downstream:
192 * **include-upstream** ('bool'): Jobs that match upstream.
193 (default False)
194 * **include-downstream** ('bool'): Jobs that match downstream.
195 (default False)
196 * **recursive** ('bool'): Jobs that are recursive.
197 (default False)
198 * **exclude-originals** ('bool'): Jobs that are originals.
199 (default False)
200
201 * **unclassified** (`dict`)
202 :unclassified:
203 * **match-type** ('str'): Jobs that match a filter to include.
204 (default includeMatched)
78 205
79 * **columns** (`list`): List of columns to be shown in view. 206 * **columns** (`list`): List of columns to be shown in view.
80 * **regex** (`str`): . Regular expression for selecting jobs 207 * **regex** (`str`): . Regular expression for selecting jobs
@@ -214,6 +341,189 @@ class List(jenkins_jobs.modules.base.Base):
214 convert_mapping_to_xml(js_xml, js_data, mapping, 341 convert_mapping_to_xml(js_xml, js_data, mapping,
215 fail_required=True) 342 fail_required=True)
216 343
344 if jobfilter == 'upstream-downstream':
345 ud_xml = XML.SubElement(job_filter_xml,
346 'hudson.views.UpstreamDownstreamJobsFilter')
347 ud_xml.set('plugin', 'view-job-filters')
348 ud_data = jobfilters.get('upstream-downstream')
349 mapping = [
350 ('include-upstream', 'includeUpstream',
351 False),
352 ('include-downstream', 'includeDownstream', False),
353 ('recursive', 'recursive', False),
354 ('exclude-originals', 'excludeOriginals', False),
355 ]
356 convert_mapping_to_xml(ud_xml, ud_data, mapping,
357 fail_required=True)
358
359 if jobfilter == 'fallback':
360 fb_xml = XML.SubElement(job_filter_xml,
361 'hudson.views.AddRemoveFallbackFilter')
362 fb_xml.set('plugin', 'view-job-filters')
363 fb_data = jobfilters.get('fallback')
364 mapping = [
365 ('fallback-type', 'fallbackTypeString',
366 'REMOVE_ALL_IF_ALL_INCLUDED'),
367 ('fallback-type', 'fallbackType',
368 'REMOVE_ALL_IF_ALL_INCLUDED'),
369 ]
370 convert_mapping_to_xml(fb_xml, fb_data, mapping,
371 fail_required=True)
372
373 if jobfilter == 'build-status':
374 bs_xml = XML.SubElement(job_filter_xml,
375 'hudson.views.BuildStatusFilter')
376 bs_xml.set('plugin', 'view-job-filters')
377 bs_data = jobfilters.get('build-status')
378 mapping = [
379 ('match-type', 'includeExcludeTypeString',
380 'includeMatched'),
381 ('never-built', 'neverBuilt', False),
382 ('building', 'building', False),
383 ('in-build-queue', 'inBuildQueue', False),
384 ]
385 convert_mapping_to_xml(bs_xml, bs_data, mapping,
386 fail_required=True)
387
388 if jobfilter == 'user-relevence':
389 ur_xml = XML.SubElement(job_filter_xml,
390 'hudson.views.UserRelevanceFilter')
391 ur_xml.set('plugin', 'view-job-filters')
392 ur_data = jobfilters.get('user-relevence')
393 mapping = [
394 ('match-type', 'includeExcludeTypeString',
395 'includeMatched'),
396 ('build-count', 'buildCountTypeString', 'AtLeastOne'),
397 ('amount-type', 'amountTypeString', 'Hours'),
398 ('amount', 'amount', '0'),
399 ('match-user-id', 'matchUserId', False),
400 ('match-user-fullname', 'matchUserFullName', False),
401 ('ignore-case', 'ignoreCase', False),
402 ('ignore-whitespace', 'ignoreWhitespace', False),
403 ('ignore-non-alphaNumeric', 'ignoreNonAlphaNumeric',
404 False),
405 ('match-builder', 'matchBuilder', False),
406 ('match-email', 'matchEmail', False),
407 ('match-scm-changes', 'matchScmChanges', False),
408 ]
409 convert_mapping_to_xml(ur_xml, ur_data, mapping,
410 fail_required=True)
411
412 if jobfilter == 'regex-job':
413 rj_xml = XML.SubElement(job_filter_xml,
414 'hudson.views.RegExJobFilter')
415 rj_xml.set('plugin', 'view-job-filters')
416 rj_data = jobfilters.get('regex-job')
417 mapping = [
418 ('match-type', 'includeExcludeTypeString',
419 'includeMatched'),
420 ('regex-name', 'valueTypeString', ''),
421 ('regex', 'regex', ''),
422 ]
423 convert_mapping_to_xml(rj_xml, rj_data, mapping,
424 fail_required=True)
425
426 if jobfilter == 'job-type':
427 jt_xml = XML.SubElement(job_filter_xml,
428 'hudson.views.JobTypeFilter')
429 jt_xml.set('plugin', 'view-job-filters')
430 jt_data = jobfilters.get('job-type')
431 mapping = [
432 ('match-type', 'includeExcludeTypeString',
433 'includeMatched'),
434 ('job-type', 'jobType', 'hudson.model.FreeStyleProject'),
435 ]
436 convert_mapping_to_xml(jt_xml, jt_data, mapping,
437 fail_required=True)
438
439 if jobfilter == 'parameter':
440 pr_xml = XML.SubElement(job_filter_xml,
441 'hudson.views.ParameterFilter')
442 pr_xml.set('plugin', 'view-job-filters')
443 pr_data = jobfilters.get('parameter')
444 mapping = [
445 ('match-type', 'includeExcludeTypeString',
446 'includeMatched'),
447 ('name', 'nameRegex', ''),
448 ('value', 'valueRegex', ''),
449 ('description', 'descriptionRegex', ''),
450 ('use-default', 'useDefaultValue', False),
451 ('match-builds-in-progress', 'matchBuildsInProgress',
452 False),
453 ('match-all-builds', 'matchAllBuilds', False),
454 ('max-builds-to-match', 'maxBuildsToMatch', 0),
455 ]
456 convert_mapping_to_xml(pr_xml, pr_data, mapping,
457 fail_required=True)
458
459 if jobfilter == 'other-views':
460 ov_xml = XML.SubElement(job_filter_xml,
461 'hudson.views.OtherViewsFilter')
462 ov_xml.set('plugin', 'view-job-filters')
463 ov_data = jobfilters.get('other-views')
464 mapping = [
465 ('match-type', 'includeExcludeTypeString',
466 'includeMatched'),
467 ('view-name', 'otherViewName',
468 '&lt;select a view other than this one&gt;'),
469 ]
470 convert_mapping_to_xml(ov_xml, ov_data, mapping,
471 fail_required=True)
472
473 if jobfilter == 'scm':
474 st_xml = XML.SubElement(job_filter_xml,
475 'hudson.views.ScmTypeFilter')
476 st_xml.set('plugin', 'view-job-filters')
477 st_data = jobfilters.get('scm')
478 mapping = [
479 ('match-type', 'includeExcludeTypeString',
480 'includeMatched'),
481 ('scm-type', 'scmType', 'hudson.scm.NullSCM'),
482 ]
483 convert_mapping_to_xml(st_xml, st_data, mapping,
484 fail_required=True)
485
486 if jobfilter == 'secured-job':
487 sj_xml = XML.SubElement(job_filter_xml,
488 'hudson.views.SecuredJobsFilter')
489 sj_xml.set('plugin', 'view-job-filters')
490 sj_data = jobfilters.get('secured-job')
491 mapping = [
492 ('match-type', 'includeExcludeTypeString',
493 'includeMatched'),
494 ]
495 convert_mapping_to_xml(sj_xml, sj_data, mapping,
496 fail_required=True)
497
498 if jobfilter == 'user-permissions':
499 up_xml = XML.SubElement(job_filter_xml,
500 'hudson.views.SecurityFilter')
501 up_xml.set('plugin', 'view-job-filters')
502 up_data = jobfilters.get('user-permissions')
503 mapping = [
504 ('match-type', 'includeExcludeTypeString',
505 'includeMatched'),
506 ('configure', 'configure', False),
507 ('build', 'build', False),
508 ('workspace', 'workspace', False),
509 ('permission-check', 'permissionCheckType',
510 'MustMatchAll'),
511 ]
512 convert_mapping_to_xml(up_xml, up_data, mapping,
513 fail_required=True)
514
515 if jobfilter == 'unclassified':
516 uc_xml = XML.SubElement(job_filter_xml,
517 'hudson.views.UnclassifiedJobsFilter')
518 uc_xml.set('plugin', 'view-job-filters')
519 uc_data = jobfilters.get('unclassified')
520 mapping = [
521 ('match-type', 'includeExcludeTypeString',
522 'includeMatched'),
523 ]
524 convert_mapping_to_xml(uc_xml, uc_data, mapping,
525 fail_required=True)
526
217 c_xml = XML.SubElement(root, 'columns') 527 c_xml = XML.SubElement(root, 'columns')
218 columns = data.get('columns', DEFAULT_COLUMNS) 528 columns = data.get('columns', DEFAULT_COLUMNS)
219 529
diff --git a/jenkins_jobs/modules/wrappers.py b/jenkins_jobs/modules/wrappers.py
index b7c7772..4421f98 100644
--- a/jenkins_jobs/modules/wrappers.py
+++ b/jenkins_jobs/modules/wrappers.py
@@ -1054,7 +1054,7 @@ def env_script(registry, xml_parent, data):
1054 mapping = [ 1054 mapping = [
1055 ('script-content', 'script', ''), 1055 ('script-content', 'script', ''),
1056 ('script-type', 'scriptType', 'unix-script', valid_script_types), 1056 ('script-type', 'scriptType', 'unix-script', valid_script_types),
1057 ('only-run-on-parent', 'onlyRunOnParent', False)] 1057 ('only-run-on-parent', 'runOnlyOnParent', False)]
1058 convert_mapping_to_xml(el, data, mapping, fail_required=True) 1058 convert_mapping_to_xml(el, data, mapping, fail_required=True)
1059 1059
1060 1060
@@ -1479,7 +1479,7 @@ def logstash(registry, xml_parent, data):
1479 1479
1480def mongo_db(registry, xml_parent, data): 1480def mongo_db(registry, xml_parent, data):
1481 """yaml: mongo-db build wrapper 1481 """yaml: mongo-db build wrapper
1482 Initalizes a MongoDB database while running the build. 1482 Initializes a MongoDB database while running the build.
1483 Requires the Jenkins :jenkins-wiki:`MongoDB plugin <MongoDB+Plugin>`. 1483 Requires the Jenkins :jenkins-wiki:`MongoDB plugin <MongoDB+Plugin>`.
1484 1484
1485 :arg str name: The name of the MongoDB install to use (required) 1485 :arg str name: The name of the MongoDB install to use (required)
@@ -1613,7 +1613,7 @@ def ssh_agent_credentials(registry, xml_parent, data):
1613 1613
1614 1614
1615 if both **users** and **user** parameters specified, **users** will be 1615 if both **users** and **user** parameters specified, **users** will be
1616 prefered, **user** will be ignored. 1616 preferred, **user** will be ignored.
1617 1617
1618 Example: 1618 Example:
1619 1619
@@ -1876,12 +1876,12 @@ def xvfb(registry, xml_parent, data):
1876 Enable xvfb during the build. 1876 Enable xvfb during the build.
1877 Requires the Jenkins :jenkins-wiki:`Xvfb Plugin <Xvfb+Plugin>`. 1877 Requires the Jenkins :jenkins-wiki:`Xvfb Plugin <Xvfb+Plugin>`.
1878 1878
1879 :arg str installation-name: The name of the Xvfb tool instalation (default 1879 :arg str installation-name: The name of the Xvfb tool installation (default
1880 'default') 1880 'default')
1881 :arg bool auto-display-name: Uses the -displayfd option of Xvfb by which it 1881 :arg bool auto-display-name: Uses the -displayfd option of Xvfb by which it
1882 chooses it's own display name (default false) 1882 chooses it's own display name (default false)
1883 :arg str display-name: Ordinal of the display Xvfb will be running on, if 1883 :arg str display-name: Ordinal of the display Xvfb will be running on, if
1884 left empty choosen based on current build executor number (default '') 1884 left empty chosen based on current build executor number (default '')
1885 :arg str assigned-labels: If you want to start Xvfb only on specific nodes 1885 :arg str assigned-labels: If you want to start Xvfb only on specific nodes
1886 specify its name or label (default '') 1886 specify its name or label (default '')
1887 :arg bool parallel-build: When running multiple Jenkins nodes on the same 1887 :arg bool parallel-build: When running multiple Jenkins nodes on the same
diff --git a/tests/jenkins_manager/test_manager.py b/tests/jenkins_manager/test_manager.py
index cc8e3d4..ba579d1 100644
--- a/tests/jenkins_manager/test_manager.py
+++ b/tests/jenkins_manager/test_manager.py
@@ -60,11 +60,13 @@ class TestCaseTestJenkinsManager(base.BaseTestCase):
60 60
61 with mock.patch.multiple('jenkins_jobs.builder.JenkinsManager', 61 with mock.patch.multiple('jenkins_jobs.builder.JenkinsManager',
62 get_jobs=mock.DEFAULT, 62 get_jobs=mock.DEFAULT,
63 is_job=mock.DEFAULT,
63 is_managed=mock.DEFAULT, 64 is_managed=mock.DEFAULT,
64 delete_job=mock.DEFAULT) as patches: 65 delete_job=mock.DEFAULT) as patches:
65 patches['get_jobs'].return_value = [{'fullname': 'job1'}, 66 patches['get_jobs'].return_value = [{'fullname': 'job1'},
66 {'fullname': 'job2'}] 67 {'fullname': 'job2'}]
67 patches['is_managed'].side_effect = [True, True] 68 patches['is_managed'].side_effect = [True, True]
69 patches['is_job'].side_effect = [True, True]
68 70
69 self.builder.delete_old_managed() 71 self.builder.delete_old_managed()
70 self.assertEqual(patches['delete_job'].call_count, 2) 72 self.assertEqual(patches['delete_job'].call_count, 2)
diff --git a/tests/localyaml/fixtures/joinlists.json b/tests/localyaml/fixtures/joinlists.json
new file mode 100644
index 0000000..8702d17
--- /dev/null
+++ b/tests/localyaml/fixtures/joinlists.json
@@ -0,0 +1,8 @@
1[
2 {
3 "string-with-comma": "item1,item2,item3"
4 },
5 {
6 "string-with-space": "item1 item2 item3"
7 }
8]
diff --git a/tests/localyaml/fixtures/joinlists.yaml b/tests/localyaml/fixtures/joinlists.yaml
new file mode 100644
index 0000000..c970df5
--- /dev/null
+++ b/tests/localyaml/fixtures/joinlists.yaml
@@ -0,0 +1,13 @@
1- string-with-comma: !join:
2 - ','
3 -
4 - item1
5 - item2
6 - item3
7
8- string-with-space: !join:
9 - ' '
10 -
11 - item1
12 - item2
13 - item3
diff --git a/tests/parameters/fixtures/extended-choice-param-full.xml b/tests/parameters/fixtures/extended-choice-param-full.xml
index f3716a9..40560c9 100644
--- a/tests/parameters/fixtures/extended-choice-param-full.xml
+++ b/tests/parameters/fixtures/extended-choice-param-full.xml
@@ -22,6 +22,44 @@
22 <groovyScript/> 22 <groovyScript/>
23 <groovyClasspath/> 23 <groovyClasspath/>
24 </com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition> 24 </com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
25 <com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
26 <name>OPTIONS_CHECKBOX</name>
27 <description/>
28 <value>OptionA,OptionB,OptionC</value>
29 <visibleItemCount>2</visibleItemCount>
30 <multiSelectDelimiter>,</multiSelectDelimiter>
31 <quoteValue>false</quoteValue>
32 <defaultValue/>
33 <descriptionPropertyValue/>
34 <type>PT_CHECKBOX</type>
35 <propertyFile/>
36 <propertyKey/>
37 <defaultPropertyFile/>
38 <defaultPropertyKey/>
39 <descriptionPropertyFile/>
40 <descriptionPropertyKey/>
41 <groovyScript/>
42 <groovyClasspath/>
43 </com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
44 <com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
45 <name>MULTISELECTOPTIONS</name>
46 <description>Available options</description>
47 <value>foo|bar|select</value>
48 <visibleItemCount>2</visibleItemCount>
49 <multiSelectDelimiter>|</multiSelectDelimiter>
50 <quoteValue>true</quoteValue>
51 <defaultValue>foo</defaultValue>
52 <descriptionPropertyValue/>
53 <type>PT_MULTI_SELECT</type>
54 <propertyFile/>
55 <propertyKey>key</propertyKey>
56 <defaultPropertyFile/>
57 <defaultPropertyKey/>
58 <descriptionPropertyFile/>
59 <descriptionPropertyKey/>
60 <groovyScript/>
61 <groovyClasspath/>
62 </com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
25 </parameterDefinitions> 63 </parameterDefinitions>
26 </hudson.model.ParametersDefinitionProperty> 64 </hudson.model.ParametersDefinitionProperty>
27 </properties> 65 </properties>
diff --git a/tests/parameters/fixtures/extended-choice-param-full.yaml b/tests/parameters/fixtures/extended-choice-param-full.yaml
index 9d2b0d3..55a1f5e 100644
--- a/tests/parameters/fixtures/extended-choice-param-full.yaml
+++ b/tests/parameters/fixtures/extended-choice-param-full.yaml
@@ -12,3 +12,28 @@ parameters:
12 default-value: foo 12 default-value: foo
13 default-property-file: /home/property.prop 13 default-property-file: /home/property.prop
14 default-property-key: fookey 14 default-property-key: fookey
15 - extended-choice:
16 name: OPTIONS_CHECKBOX
17 type: checkbox
18 value: !join:
19 - ','
20 -
21 - OptionA
22 - OptionB
23 - OptionC
24 visible-items: 2
25 - extended-choice:
26 name: MULTISELECTOPTIONS
27 description: "Available options"
28 property-key: key
29 quote-value: true
30 type: multi-select
31 value: !join:
32 - '|'
33 -
34 - foo
35 - bar
36 - select
37 visible-items: 2
38 multi-select-delimiter: '|'
39 default-value: foo
diff --git a/tests/publishers/fixtures/postbuildscript000.plugins_info.yaml b/tests/publishers/fixtures/postbuildscript000.plugins_info.yaml
index 68edff6..7bad4f7 100644
--- a/tests/publishers/fixtures/postbuildscript000.plugins_info.yaml
+++ b/tests/publishers/fixtures/postbuildscript000.plugins_info.yaml
@@ -1,3 +1,3 @@
1- longName: 'Jenkins PostBuildScript Plugin' 1- longName: 'Jenkins Post-Build Script Plug-in'
2 shortName: 'postbuildscript' 2 shortName: 'postbuildscript'
3 version: "1.0" 3 version: "1.0"
diff --git a/tests/publishers/fixtures/postbuildscript001.plugins_info.yaml b/tests/publishers/fixtures/postbuildscript001.plugins_info.yaml
index 68edff6..7bad4f7 100644
--- a/tests/publishers/fixtures/postbuildscript001.plugins_info.yaml
+++ b/tests/publishers/fixtures/postbuildscript001.plugins_info.yaml
@@ -1,3 +1,3 @@
1- longName: 'Jenkins PostBuildScript Plugin' 1- longName: 'Jenkins Post-Build Script Plug-in'
2 shortName: 'postbuildscript' 2 shortName: 'postbuildscript'
3 version: "1.0" 3 version: "1.0"
diff --git a/tests/publishers/fixtures/postbuildscript002.plugins_info.yaml b/tests/publishers/fixtures/postbuildscript002.plugins_info.yaml
index 68edff6..7bad4f7 100644
--- a/tests/publishers/fixtures/postbuildscript002.plugins_info.yaml
+++ b/tests/publishers/fixtures/postbuildscript002.plugins_info.yaml
@@ -1,3 +1,3 @@
1- longName: 'Jenkins PostBuildScript Plugin' 1- longName: 'Jenkins Post-Build Script Plug-in'
2 shortName: 'postbuildscript' 2 shortName: 'postbuildscript'
3 version: "1.0" 3 version: "1.0"
diff --git a/tests/publishers/fixtures/postbuildscript003.plugins_info.yaml b/tests/publishers/fixtures/postbuildscript003.plugins_info.yaml
index 68edff6..7bad4f7 100644
--- a/tests/publishers/fixtures/postbuildscript003.plugins_info.yaml
+++ b/tests/publishers/fixtures/postbuildscript003.plugins_info.yaml
@@ -1,3 +1,3 @@
1- longName: 'Jenkins PostBuildScript Plugin' 1- longName: 'Jenkins Post-Build Script Plug-in'
2 shortName: 'postbuildscript' 2 shortName: 'postbuildscript'
3 version: "1.0" 3 version: "1.0"
diff --git a/tests/publishers/fixtures/postbuildscript004.plugins_info.yaml b/tests/publishers/fixtures/postbuildscript004.plugins_info.yaml
index 68edff6..7bad4f7 100644
--- a/tests/publishers/fixtures/postbuildscript004.plugins_info.yaml
+++ b/tests/publishers/fixtures/postbuildscript004.plugins_info.yaml
@@ -1,3 +1,3 @@
1- longName: 'Jenkins PostBuildScript Plugin' 1- longName: 'Jenkins Post-Build Script Plug-in'
2 shortName: 'postbuildscript' 2 shortName: 'postbuildscript'
3 version: "1.0" 3 version: "1.0"
diff --git a/tests/triggers/fixtures/gitlab001.xml b/tests/triggers/fixtures/gitlab001.xml
index 1c03682..012c4b9 100644
--- a/tests/triggers/fixtures/gitlab001.xml
+++ b/tests/triggers/fixtures/gitlab001.xml
@@ -7,6 +7,8 @@
7 <spec/> 7 <spec/>
8 <triggerOnPush>true</triggerOnPush> 8 <triggerOnPush>true</triggerOnPush>
9 <triggerOnMergeRequest>true</triggerOnMergeRequest> 9 <triggerOnMergeRequest>true</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
10 <triggerOnNoteRequest>true</triggerOnNoteRequest> 12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
11 <noteRegex>Jenkins please retry a build</noteRegex> 13 <noteRegex>Jenkins please retry a build</noteRegex>
12 <ciSkip>true</ciSkip> 14 <ciSkip>true</ciSkip>
diff --git a/tests/triggers/fixtures/gitlab002.xml b/tests/triggers/fixtures/gitlab002.xml
index 48a583d..cf08f3c 100644
--- a/tests/triggers/fixtures/gitlab002.xml
+++ b/tests/triggers/fixtures/gitlab002.xml
@@ -7,6 +7,8 @@
7 <spec/> 7 <spec/>
8 <triggerOnPush>true</triggerOnPush> 8 <triggerOnPush>true</triggerOnPush>
9 <triggerOnMergeRequest>true</triggerOnMergeRequest> 9 <triggerOnMergeRequest>true</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
10 <triggerOnNoteRequest>true</triggerOnNoteRequest> 12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
11 <noteRegex>Jenkins please retry a build</noteRegex> 13 <noteRegex>Jenkins please retry a build</noteRegex>
12 <ciSkip>true</ciSkip> 14 <ciSkip>true</ciSkip>
diff --git a/tests/triggers/fixtures/gitlab003.xml b/tests/triggers/fixtures/gitlab003.xml
index baf204d..609180d 100644
--- a/tests/triggers/fixtures/gitlab003.xml
+++ b/tests/triggers/fixtures/gitlab003.xml
@@ -7,6 +7,8 @@
7 <spec/> 7 <spec/>
8 <triggerOnPush>true</triggerOnPush> 8 <triggerOnPush>true</triggerOnPush>
9 <triggerOnMergeRequest>true</triggerOnMergeRequest> 9 <triggerOnMergeRequest>true</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
10 <triggerOnNoteRequest>true</triggerOnNoteRequest> 12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
11 <noteRegex>Jenkins please retry a build</noteRegex> 13 <noteRegex>Jenkins please retry a build</noteRegex>
12 <ciSkip>true</ciSkip> 14 <ciSkip>true</ciSkip>
diff --git a/tests/triggers/fixtures/gitlab004.xml b/tests/triggers/fixtures/gitlab004.xml
index d10d661..5dcaeaa 100644
--- a/tests/triggers/fixtures/gitlab004.xml
+++ b/tests/triggers/fixtures/gitlab004.xml
@@ -7,6 +7,8 @@
7 <spec/> 7 <spec/>
8 <triggerOnPush>false</triggerOnPush> 8 <triggerOnPush>false</triggerOnPush>
9 <triggerOnMergeRequest>false</triggerOnMergeRequest> 9 <triggerOnMergeRequest>false</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
10 <triggerOnNoteRequest>true</triggerOnNoteRequest> 12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
11 <noteRegex>Jenkins please retry a build</noteRegex> 13 <noteRegex>Jenkins please retry a build</noteRegex>
12 <ciSkip>false</ciSkip> 14 <ciSkip>false</ciSkip>
diff --git a/tests/triggers/fixtures/gitlab005.xml b/tests/triggers/fixtures/gitlab005.xml
index 3e1e168..2daa009 100644
--- a/tests/triggers/fixtures/gitlab005.xml
+++ b/tests/triggers/fixtures/gitlab005.xml
@@ -7,6 +7,8 @@
7 <spec/> 7 <spec/>
8 <triggerOnPush>true</triggerOnPush> 8 <triggerOnPush>true</triggerOnPush>
9 <triggerOnMergeRequest>true</triggerOnMergeRequest> 9 <triggerOnMergeRequest>true</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
10 <triggerOnNoteRequest>true</triggerOnNoteRequest> 12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
11 <noteRegex>Jenkins please retry a build</noteRegex> 13 <noteRegex>Jenkins please retry a build</noteRegex>
12 <ciSkip>true</ciSkip> 14 <ciSkip>true</ciSkip>
diff --git a/tests/triggers/fixtures/gitlab006.xml b/tests/triggers/fixtures/gitlab006.xml
index af5fdac..c83293e 100644
--- a/tests/triggers/fixtures/gitlab006.xml
+++ b/tests/triggers/fixtures/gitlab006.xml
@@ -7,6 +7,8 @@
7 <spec/> 7 <spec/>
8 <triggerOnPush>false</triggerOnPush> 8 <triggerOnPush>false</triggerOnPush>
9 <triggerOnMergeRequest>false</triggerOnMergeRequest> 9 <triggerOnMergeRequest>false</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
10 <triggerOnNoteRequest>true</triggerOnNoteRequest> 12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
11 <noteRegex>Retrigger</noteRegex> 13 <noteRegex>Retrigger</noteRegex>
12 <ciSkip>false</ciSkip> 14 <ciSkip>false</ciSkip>
diff --git a/tests/triggers/fixtures/gitlab007.plugins_info.yaml b/tests/triggers/fixtures/gitlab007.plugins_info.yaml
new file mode 100644
index 0000000..072da1d
--- /dev/null
+++ b/tests/triggers/fixtures/gitlab007.plugins_info.yaml
@@ -0,0 +1,3 @@
1- longName: 'GitLab Plugin'
2 shortName: 'gitlab-plugin'
3 version: "1.4.6"
diff --git a/tests/triggers/fixtures/gitlab007.xml b/tests/triggers/fixtures/gitlab007.xml
new file mode 100644
index 0000000..f7611fd
--- /dev/null
+++ b/tests/triggers/fixtures/gitlab007.xml
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <triggers class="vector">
4 <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
5 <triggerOpenMergeRequestOnPush>never</triggerOpenMergeRequestOnPush>
6 <branchFilterType>All</branchFilterType>
7 <spec/>
8 <triggerOnPush>true</triggerOnPush>
9 <triggerOnMergeRequest>true</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>true</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>true</triggerOnClosedMergeRequest>
12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
13 <noteRegex>Jenkins please retry a build</noteRegex>
14 <ciSkip>true</ciSkip>
15 <skipWorkInProgressMergeRequest>true</skipWorkInProgressMergeRequest>
16 <setBuildDescription>true</setBuildDescription>
17 <addNoteOnMergeRequest>true</addNoteOnMergeRequest>
18 <addVoteOnMergeRequest>true</addVoteOnMergeRequest>
19 <acceptMergeRequestOnSuccess>false</acceptMergeRequestOnSuccess>
20 <addCiMessage>true</addCiMessage>
21 <allowAllBranches>true</allowAllBranches>
22 <targetBranchRegex/>
23 <includeBranchesSpec>master, master2, local-test</includeBranchesSpec>
24 <excludeBranchesSpec>broken-test, master-foo</excludeBranchesSpec>
25 </com.dabsquared.gitlabjenkins.GitLabPushTrigger>
26 </triggers>
27</project>
diff --git a/tests/triggers/fixtures/gitlab007.yaml b/tests/triggers/fixtures/gitlab007.yaml
new file mode 100644
index 0000000..ac2db3c
--- /dev/null
+++ b/tests/triggers/fixtures/gitlab007.yaml
@@ -0,0 +1,19 @@
1triggers:
2 - gitlab:
3 trigger-push: true
4 trigger-merge-request: true
5 trigger-accepted-merge-request: true
6 trigger-closed-merge-request: true
7 ci-skip: true
8 set-build-description: true
9 add-note-merge-request: true
10 add-vote-merge-request: true
11 add-ci-message: true
12 allow-all-branches: true
13 include-branches:
14 - 'master'
15 - 'master2'
16 - 'local-test'
17 exclude-branches:
18 - 'broken-test'
19 - 'master-foo'
diff --git a/tests/triggers/fixtures/gitlab008.plugins_info.yaml b/tests/triggers/fixtures/gitlab008.plugins_info.yaml
new file mode 100644
index 0000000..56447ee
--- /dev/null
+++ b/tests/triggers/fixtures/gitlab008.plugins_info.yaml
@@ -0,0 +1,3 @@
1- longName: 'GitLab Plugin'
2 shortName: 'gitlab-plugin'
3 version: "1.1.26"
diff --git a/tests/triggers/fixtures/gitlab008.xml b/tests/triggers/fixtures/gitlab008.xml
new file mode 100644
index 0000000..dcb2b4d
--- /dev/null
+++ b/tests/triggers/fixtures/gitlab008.xml
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <triggers class="vector">
4 <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
5 <triggerOpenMergeRequestOnPush>both</triggerOpenMergeRequestOnPush>
6 <branchFilterName/>
7 <spec/>
8 <triggerOnPush>false</triggerOnPush>
9 <triggerOnMergeRequest>false</triggerOnMergeRequest>
10 <triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
11 <triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
12 <triggerOnNoteRequest>true</triggerOnNoteRequest>
13 <noteRegex>Jenkins please retry a build</noteRegex>
14 <ciSkip>false</ciSkip>
15 <skipWorkInProgressMergeRequest>true</skipWorkInProgressMergeRequest>
16 <setBuildDescription>false</setBuildDescription>
17 <addNoteOnMergeRequest>false</addNoteOnMergeRequest>
18 <addVoteOnMergeRequest>false</addVoteOnMergeRequest>
19 <acceptMergeRequestOnSuccess>false</acceptMergeRequestOnSuccess>
20 <addCiMessage>true</addCiMessage>
21 <allowAllBranches>false</allowAllBranches>
22 <targetBranchRegex/>
23 <includeBranchesSpec/>
24 <excludeBranchesSpec/>
25 </com.dabsquared.gitlabjenkins.GitLabPushTrigger>
26 </triggers>
27</project>
diff --git a/tests/triggers/fixtures/gitlab008.yaml b/tests/triggers/fixtures/gitlab008.yaml
new file mode 100644
index 0000000..bad401f
--- /dev/null
+++ b/tests/triggers/fixtures/gitlab008.yaml
@@ -0,0 +1,11 @@
1triggers:
2 - gitlab:
3 trigger-push: false
4 trigger-merge-request: false
5 trigger-open-merge-request-push: both
6 ci-skip: false
7 set-build-description: false
8 add-note-merge-request: false
9 add-vote-merge-request: false
10 add-ci-message: true
11 branch-filter-type: All
diff --git a/tests/triggers/fixtures/jira-changelog-full.xml b/tests/triggers/fixtures/jira-changelog-full.xml
new file mode 100644
index 0000000..0a0cd80
--- /dev/null
+++ b/tests/triggers/fixtures/jira-changelog-full.xml
@@ -0,0 +1,32 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <triggers class="vector">
4 <com.ceilfors.jenkins.plugins.jiratrigger.JiraChangelogTrigger plugin="jira-trigger">
5 <jqlFilter>filter</jqlFilter>
6 <changelogMatchers>
7 <com.ceilfors.jenkins.plugins.jiratrigger.changelog.CustomFieldChangelogMatcher>
8 <fieldType>CUSTOM</fieldType>
9 <field>name</field>
10 <newValue>val1</newValue>
11 <oldValue>val2</oldValue>
12 <comparingNewValue>true</comparingNewValue>
13 <comparingOldValue>true</comparingOldValue>
14 </com.ceilfors.jenkins.plugins.jiratrigger.changelog.CustomFieldChangelogMatcher>
15 <com.ceilfors.jenkins.plugins.jiratrigger.changelog.JiraFieldChangelogMatcher>
16 <fieldType>JIRA</fieldType>
17 <field>versions</field>
18 <newValue>val3</newValue>
19 <oldValue>val4</oldValue>
20 <comparingNewValue>true</comparingNewValue>
21 <comparingOldValue>true</comparingOldValue>
22 </com.ceilfors.jenkins.plugins.jiratrigger.changelog.JiraFieldChangelogMatcher>
23 </changelogMatchers>
24 <parameterMappings>
25 <com.ceilfors.jenkins.plugins.jiratrigger.parameter.IssueAttributePathParameterMapping>
26 <jenkinsParameter>param</jenkinsParameter>
27 <issueAttributePath>path</issueAttributePath>
28 </com.ceilfors.jenkins.plugins.jiratrigger.parameter.IssueAttributePathParameterMapping>
29 </parameterMappings>
30 </com.ceilfors.jenkins.plugins.jiratrigger.JiraChangelogTrigger>
31 </triggers>
32</project>
diff --git a/tests/triggers/fixtures/jira-changelog-full.yaml b/tests/triggers/fixtures/jira-changelog-full.yaml
new file mode 100644
index 0000000..3a3419d
--- /dev/null
+++ b/tests/triggers/fixtures/jira-changelog-full.yaml
@@ -0,0 +1,19 @@
1triggers:
2 - jira-changelog:
3 jql-filter: filter
4 changelog-matchers:
5 - field-type: 'CUSTOM'
6 field: name
7 new-value: val1
8 old-value: val2
9 compare-new-value: true
10 compare-old-value: true
11 - field-type: 'JIRA'
12 field: versions
13 new-value: val3
14 old-value: val4
15 compare-new-value: true
16 compare-old-value: true
17 parameter-mapping:
18 - jenkins-parameter: param
19 issue-attribute-path: path
diff --git a/tests/triggers/fixtures/jira-changelog-minimal.xml b/tests/triggers/fixtures/jira-changelog-minimal.xml
new file mode 100644
index 0000000..0a2a8bf
--- /dev/null
+++ b/tests/triggers/fixtures/jira-changelog-minimal.xml
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <triggers class="vector">
4 <com.ceilfors.jenkins.plugins.jiratrigger.JiraChangelogTrigger plugin="jira-trigger">
5 <jqlFilter/>
6 <changelogMatchers/>
7 <parameterMappings/>
8 </com.ceilfors.jenkins.plugins.jiratrigger.JiraChangelogTrigger>
9 </triggers>
10</project>
diff --git a/tests/triggers/fixtures/jira-changelog-minimal.yaml b/tests/triggers/fixtures/jira-changelog-minimal.yaml
new file mode 100644
index 0000000..524d87e
--- /dev/null
+++ b/tests/triggers/fixtures/jira-changelog-minimal.yaml
@@ -0,0 +1,2 @@
1triggers:
2 - jira-changelog
diff --git a/tests/views/fixtures/view_list_build_status_full.xml b/tests/views/fixtures/view_list_build_status_full.xml
new file mode 100644
index 0000000..d11fbcd
--- /dev/null
+++ b/tests/views/fixtures/view_list_build_status_full.xml
@@ -0,0 +1,30 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.BuildStatusFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <neverBuilt>true</neverBuilt>
15 <building>true</building>
16 <inBuildQueue>true</inBuildQueue>
17 </hudson.views.BuildStatusFilter>
18 </jobFilters>
19 <columns>
20 <hudson.views.StatusColumn/>
21 <hudson.views.WeatherColumn/>
22 <hudson.views.JobColumn/>
23 <hudson.views.LastSuccessColumn/>
24 <hudson.views.LastFailureColumn/>
25 <hudson.views.LastDurationColumn/>
26 <hudson.views.BuildButtonColumn/>
27 </columns>
28 <recurse>true</recurse>
29 <statusFilter>false</statusFilter>
30</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_build_status_full.yaml b/tests/views/fixtures/view_list_build_status_full.yaml
new file mode 100644
index 0000000..4d9f6fb
--- /dev/null
+++ b/tests/views/fixtures/view_list_build_status_full.yaml
@@ -0,0 +1,13 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 build-status:
8 match-type: includeMatched
9 never-built: true
10 building: true
11 in-build-queue: true
12recurse: true
13status-filter: false
diff --git a/tests/views/fixtures/view_list_build_status_min.xml b/tests/views/fixtures/view_list_build_status_min.xml
new file mode 100644
index 0000000..27a021d
--- /dev/null
+++ b/tests/views/fixtures/view_list_build_status_min.xml
@@ -0,0 +1,30 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.BuildStatusFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <neverBuilt>false</neverBuilt>
15 <building>false</building>
16 <inBuildQueue>false</inBuildQueue>
17 </hudson.views.BuildStatusFilter>
18 </jobFilters>
19 <columns>
20 <hudson.views.StatusColumn/>
21 <hudson.views.WeatherColumn/>
22 <hudson.views.JobColumn/>
23 <hudson.views.LastSuccessColumn/>
24 <hudson.views.LastFailureColumn/>
25 <hudson.views.LastDurationColumn/>
26 <hudson.views.BuildButtonColumn/>
27 </columns>
28 <recurse>true</recurse>
29 <statusFilter>false</statusFilter>
30</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_build_status_min.yaml b/tests/views/fixtures/view_list_build_status_min.yaml
new file mode 100644
index 0000000..0fea5b5
--- /dev/null
+++ b/tests/views/fixtures/view_list_build_status_min.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 build-status:
8 match-type: includeMatched
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_fallback_full001.xml b/tests/views/fixtures/view_list_fallback_full001.xml
new file mode 100644
index 0000000..83f7ef8
--- /dev/null
+++ b/tests/views/fixtures/view_list_fallback_full001.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.AddRemoveFallbackFilter plugin="view-job-filters">
13 <fallbackTypeString>REMOVE_ALL_IF_ALL_INCLUDED</fallbackTypeString>
14 <fallbackType>REMOVE_ALL_IF_ALL_INCLUDED</fallbackType>
15 </hudson.views.AddRemoveFallbackFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_fallback_full001.yaml b/tests/views/fixtures/view_list_fallback_full001.yaml
new file mode 100644
index 0000000..4534b96
--- /dev/null
+++ b/tests/views/fixtures/view_list_fallback_full001.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 fallback:
8 fallback-type: REMOVE_ALL_IF_ALL_INCLUDED
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_fallback_full002.xml b/tests/views/fixtures/view_list_fallback_full002.xml
new file mode 100644
index 0000000..fcac1af
--- /dev/null
+++ b/tests/views/fixtures/view_list_fallback_full002.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.AddRemoveFallbackFilter plugin="view-job-filters">
13 <fallbackTypeString>ADD_ALL_IF_ALL_INCLUDED</fallbackTypeString>
14 <fallbackType>ADD_ALL_IF_ALL_INCLUDED</fallbackType>
15 </hudson.views.AddRemoveFallbackFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_fallback_full002.yaml b/tests/views/fixtures/view_list_fallback_full002.yaml
new file mode 100644
index 0000000..d6214be
--- /dev/null
+++ b/tests/views/fixtures/view_list_fallback_full002.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 fallback:
8 fallback-type: ADD_ALL_IF_ALL_INCLUDED
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_jobtype_filter_full.xml b/tests/views/fixtures/view_list_jobtype_filter_full.xml
new file mode 100644
index 0000000..2de03de
--- /dev/null
+++ b/tests/views/fixtures/view_list_jobtype_filter_full.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.JobTypeFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <jobType>hudson.model.FreeStyleProject</jobType>
15 </hudson.views.JobTypeFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_jobtype_filter_full.yaml b/tests/views/fixtures/view_list_jobtype_filter_full.yaml
new file mode 100644
index 0000000..20689de
--- /dev/null
+++ b/tests/views/fixtures/view_list_jobtype_filter_full.yaml
@@ -0,0 +1,11 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 job-type:
8 match-type: includeMatched
9 job-tpye: hudson.model.FreeStyleProject
10recurse: true
11status-filter: false
diff --git a/tests/views/fixtures/view_list_jobtype_filter_min.xml b/tests/views/fixtures/view_list_jobtype_filter_min.xml
new file mode 100644
index 0000000..2de03de
--- /dev/null
+++ b/tests/views/fixtures/view_list_jobtype_filter_min.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.JobTypeFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <jobType>hudson.model.FreeStyleProject</jobType>
15 </hudson.views.JobTypeFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_jobtype_filter_min.yaml b/tests/views/fixtures/view_list_jobtype_filter_min.yaml
new file mode 100644
index 0000000..f5138a1
--- /dev/null
+++ b/tests/views/fixtures/view_list_jobtype_filter_min.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 job-type:
8 match-type: includeMatched
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_otherviews_filter_full.xml b/tests/views/fixtures/view_list_otherviews_filter_full.xml
new file mode 100644
index 0000000..5db2e9e
--- /dev/null
+++ b/tests/views/fixtures/view_list_otherviews_filter_full.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.OtherViewsFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <otherViewName>&amp;lt;select a view other than this one&amp;gt;</otherViewName>
15 </hudson.views.OtherViewsFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_otherviews_filter_full.yaml b/tests/views/fixtures/view_list_otherviews_filter_full.yaml
new file mode 100644
index 0000000..f7229a3
--- /dev/null
+++ b/tests/views/fixtures/view_list_otherviews_filter_full.yaml
@@ -0,0 +1,11 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 other-views:
8 match-type: includeMatched
9 view-name: '&lt;select a view other than this one&gt;'
10recurse: true
11status-filter: false
diff --git a/tests/views/fixtures/view_list_otherviews_filter_min.xml b/tests/views/fixtures/view_list_otherviews_filter_min.xml
new file mode 100644
index 0000000..5db2e9e
--- /dev/null
+++ b/tests/views/fixtures/view_list_otherviews_filter_min.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.OtherViewsFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <otherViewName>&amp;lt;select a view other than this one&amp;gt;</otherViewName>
15 </hudson.views.OtherViewsFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_otherviews_filter_min.yaml b/tests/views/fixtures/view_list_otherviews_filter_min.yaml
new file mode 100644
index 0000000..8972afc
--- /dev/null
+++ b/tests/views/fixtures/view_list_otherviews_filter_min.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 other-views:
8 match-type: includeMatched
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_parameter_filter_full.xml b/tests/views/fixtures/view_list_parameter_filter_full.xml
new file mode 100644
index 0000000..1ea2eff
--- /dev/null
+++ b/tests/views/fixtures/view_list_parameter_filter_full.xml
@@ -0,0 +1,34 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.ParameterFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <nameRegex>test</nameRegex>
15 <valueRegex>test*</valueRegex>
16 <descriptionRegex>test jobs</descriptionRegex>
17 <useDefaultValue>true</useDefaultValue>
18 <matchBuildsInProgress>true</matchBuildsInProgress>
19 <matchAllBuilds>true</matchAllBuilds>
20 <maxBuildsToMatch>0</maxBuildsToMatch>
21 </hudson.views.ParameterFilter>
22 </jobFilters>
23 <columns>
24 <hudson.views.StatusColumn/>
25 <hudson.views.WeatherColumn/>
26 <hudson.views.JobColumn/>
27 <hudson.views.LastSuccessColumn/>
28 <hudson.views.LastFailureColumn/>
29 <hudson.views.LastDurationColumn/>
30 <hudson.views.BuildButtonColumn/>
31 </columns>
32 <recurse>true</recurse>
33 <statusFilter>false</statusFilter>
34</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_parameter_filter_full.yaml b/tests/views/fixtures/view_list_parameter_filter_full.yaml
new file mode 100644
index 0000000..fc77f7d
--- /dev/null
+++ b/tests/views/fixtures/view_list_parameter_filter_full.yaml
@@ -0,0 +1,17 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 parameter:
8 match-type: includeMatched
9 name: test
10 value: test*
11 description: test jobs
12 use-default: true
13 match-builds-in-progress: true
14 match-all-builds: true
15 max-builds-to-match: 0
16recurse: true
17status-filter: false
diff --git a/tests/views/fixtures/view_list_parameter_filter_min.xml b/tests/views/fixtures/view_list_parameter_filter_min.xml
new file mode 100644
index 0000000..921eae7
--- /dev/null
+++ b/tests/views/fixtures/view_list_parameter_filter_min.xml
@@ -0,0 +1,34 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.ParameterFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <nameRegex>test</nameRegex>
15 <valueRegex/>
16 <descriptionRegex/>
17 <useDefaultValue>false</useDefaultValue>
18 <matchBuildsInProgress>false</matchBuildsInProgress>
19 <matchAllBuilds>false</matchAllBuilds>
20 <maxBuildsToMatch>0</maxBuildsToMatch>
21 </hudson.views.ParameterFilter>
22 </jobFilters>
23 <columns>
24 <hudson.views.StatusColumn/>
25 <hudson.views.WeatherColumn/>
26 <hudson.views.JobColumn/>
27 <hudson.views.LastSuccessColumn/>
28 <hudson.views.LastFailureColumn/>
29 <hudson.views.LastDurationColumn/>
30 <hudson.views.BuildButtonColumn/>
31 </columns>
32 <recurse>true</recurse>
33 <statusFilter>false</statusFilter>
34</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_parameter_filter_min.yaml b/tests/views/fixtures/view_list_parameter_filter_min.yaml
new file mode 100644
index 0000000..afa6dc2
--- /dev/null
+++ b/tests/views/fixtures/view_list_parameter_filter_min.yaml
@@ -0,0 +1,11 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 parameter:
8 match-type: includeMatched
9 name: 'test'
10recurse: true
11status-filter: false
diff --git a/tests/views/fixtures/view_list_regexjobs_filter_full.xml b/tests/views/fixtures/view_list_regexjobs_filter_full.xml
new file mode 100644
index 0000000..7242ea0
--- /dev/null
+++ b/tests/views/fixtures/view_list_regexjobs_filter_full.xml
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.RegExJobFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <valueTypeString>NAME</valueTypeString>
15 <regex>.*</regex>
16 </hudson.views.RegExJobFilter>
17 </jobFilters>
18 <columns>
19 <hudson.views.StatusColumn/>
20 <hudson.views.WeatherColumn/>
21 <hudson.views.JobColumn/>
22 <hudson.views.LastSuccessColumn/>
23 <hudson.views.LastFailureColumn/>
24 <hudson.views.LastDurationColumn/>
25 <hudson.views.BuildButtonColumn/>
26 </columns>
27 <recurse>true</recurse>
28 <statusFilter>false</statusFilter>
29</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_regexjobs_filter_full.yaml b/tests/views/fixtures/view_list_regexjobs_filter_full.yaml
new file mode 100644
index 0000000..18edb79
--- /dev/null
+++ b/tests/views/fixtures/view_list_regexjobs_filter_full.yaml
@@ -0,0 +1,12 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 regex-job:
8 match-type: includeMatched
9 regex-name: NAME
10 regex: '.*'
11recurse: true
12status-filter: false
diff --git a/tests/views/fixtures/view_list_regexjobs_filter_min.xml b/tests/views/fixtures/view_list_regexjobs_filter_min.xml
new file mode 100644
index 0000000..461edc3
--- /dev/null
+++ b/tests/views/fixtures/view_list_regexjobs_filter_min.xml
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.RegExJobFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <valueTypeString>NAME</valueTypeString>
15 <regex/>
16 </hudson.views.RegExJobFilter>
17 </jobFilters>
18 <columns>
19 <hudson.views.StatusColumn/>
20 <hudson.views.WeatherColumn/>
21 <hudson.views.JobColumn/>
22 <hudson.views.LastSuccessColumn/>
23 <hudson.views.LastFailureColumn/>
24 <hudson.views.LastDurationColumn/>
25 <hudson.views.BuildButtonColumn/>
26 </columns>
27 <recurse>true</recurse>
28 <statusFilter>false</statusFilter>
29</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_regexjobs_filter_min.yaml b/tests/views/fixtures/view_list_regexjobs_filter_min.yaml
new file mode 100644
index 0000000..3592968
--- /dev/null
+++ b/tests/views/fixtures/view_list_regexjobs_filter_min.yaml
@@ -0,0 +1,11 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 regex-job:
8 match-type: includeMatched
9 regex-name: NAME
10recurse: true
11status-filter: false
diff --git a/tests/views/fixtures/view_list_scmtype_filter_full.xml b/tests/views/fixtures/view_list_scmtype_filter_full.xml
new file mode 100644
index 0000000..b2f710d
--- /dev/null
+++ b/tests/views/fixtures/view_list_scmtype_filter_full.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.ScmTypeFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <scmType>hudson.scm.NullSCM</scmType>
15 </hudson.views.ScmTypeFilter>
16 </jobFilters>
17 <columns>
18 <hudson.views.StatusColumn/>
19 <hudson.views.WeatherColumn/>
20 <hudson.views.JobColumn/>
21 <hudson.views.LastSuccessColumn/>
22 <hudson.views.LastFailureColumn/>
23 <hudson.views.LastDurationColumn/>
24 <hudson.views.BuildButtonColumn/>
25 </columns>
26 <recurse>true</recurse>
27 <statusFilter>false</statusFilter>
28</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_scmtype_filter_full.yaml b/tests/views/fixtures/view_list_scmtype_filter_full.yaml
new file mode 100644
index 0000000..f36218e
--- /dev/null
+++ b/tests/views/fixtures/view_list_scmtype_filter_full.yaml
@@ -0,0 +1,11 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 scm:
8 match-type: includeMatched
9 scm-type: hudson.scm.NullSCM
10recurse: true
11status-filter: false
diff --git a/tests/views/fixtures/view_list_securedjobs_filter_full.xml b/tests/views/fixtures/view_list_securedjobs_filter_full.xml
new file mode 100644
index 0000000..94c61cd
--- /dev/null
+++ b/tests/views/fixtures/view_list_securedjobs_filter_full.xml
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.SecuredJobsFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 </hudson.views.SecuredJobsFilter>
15 </jobFilters>
16 <columns>
17 <hudson.views.StatusColumn/>
18 <hudson.views.WeatherColumn/>
19 <hudson.views.JobColumn/>
20 <hudson.views.LastSuccessColumn/>
21 <hudson.views.LastFailureColumn/>
22 <hudson.views.LastDurationColumn/>
23 <hudson.views.BuildButtonColumn/>
24 </columns>
25 <recurse>true</recurse>
26 <statusFilter>false</statusFilter>
27</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_securedjobs_filter_full.yaml b/tests/views/fixtures/view_list_securedjobs_filter_full.yaml
new file mode 100644
index 0000000..1a48760
--- /dev/null
+++ b/tests/views/fixtures/view_list_securedjobs_filter_full.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 secured-job:
8 match-type: includeMatched
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_security_filter_full.xml b/tests/views/fixtures/view_list_security_filter_full.xml
new file mode 100644
index 0000000..f378a4e
--- /dev/null
+++ b/tests/views/fixtures/view_list_security_filter_full.xml
@@ -0,0 +1,31 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.SecurityFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <configure>false</configure>
15 <build>false</build>
16 <workspace>false</workspace>
17 <permissionCheckType>MustMatchAll</permissionCheckType>
18 </hudson.views.SecurityFilter>
19 </jobFilters>
20 <columns>
21 <hudson.views.StatusColumn/>
22 <hudson.views.WeatherColumn/>
23 <hudson.views.JobColumn/>
24 <hudson.views.LastSuccessColumn/>
25 <hudson.views.LastFailureColumn/>
26 <hudson.views.LastDurationColumn/>
27 <hudson.views.BuildButtonColumn/>
28 </columns>
29 <recurse>true</recurse>
30 <statusFilter>false</statusFilter>
31</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_security_filter_full.yaml b/tests/views/fixtures/view_list_security_filter_full.yaml
new file mode 100644
index 0000000..bc69679
--- /dev/null
+++ b/tests/views/fixtures/view_list_security_filter_full.yaml
@@ -0,0 +1,14 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 user-permissions:
8 match-type: includeMatched
9 configure: false
10 build: false
11 workspace: false
12 permission-check: MustMatchAll
13recurse: true
14status-filter: false
diff --git a/tests/views/fixtures/view_list_security_filter_min.xml b/tests/views/fixtures/view_list_security_filter_min.xml
new file mode 100644
index 0000000..f378a4e
--- /dev/null
+++ b/tests/views/fixtures/view_list_security_filter_min.xml
@@ -0,0 +1,31 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.SecurityFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <configure>false</configure>
15 <build>false</build>
16 <workspace>false</workspace>
17 <permissionCheckType>MustMatchAll</permissionCheckType>
18 </hudson.views.SecurityFilter>
19 </jobFilters>
20 <columns>
21 <hudson.views.StatusColumn/>
22 <hudson.views.WeatherColumn/>
23 <hudson.views.JobColumn/>
24 <hudson.views.LastSuccessColumn/>
25 <hudson.views.LastFailureColumn/>
26 <hudson.views.LastDurationColumn/>
27 <hudson.views.BuildButtonColumn/>
28 </columns>
29 <recurse>true</recurse>
30 <statusFilter>false</statusFilter>
31</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_security_filter_min.yaml b/tests/views/fixtures/view_list_security_filter_min.yaml
new file mode 100644
index 0000000..863dc44
--- /dev/null
+++ b/tests/views/fixtures/view_list_security_filter_min.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 user-permissions:
8 permission-check: MustMatchAll
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_unclassified_filter_full.xml b/tests/views/fixtures/view_list_unclassified_filter_full.xml
new file mode 100644
index 0000000..2dbb3eb
--- /dev/null
+++ b/tests/views/fixtures/view_list_unclassified_filter_full.xml
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.UnclassifiedJobsFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 </hudson.views.UnclassifiedJobsFilter>
15 </jobFilters>
16 <columns>
17 <hudson.views.StatusColumn/>
18 <hudson.views.WeatherColumn/>
19 <hudson.views.JobColumn/>
20 <hudson.views.LastSuccessColumn/>
21 <hudson.views.LastFailureColumn/>
22 <hudson.views.LastDurationColumn/>
23 <hudson.views.BuildButtonColumn/>
24 </columns>
25 <recurse>true</recurse>
26 <statusFilter>false</statusFilter>
27</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_unclassified_filter_full.yaml b/tests/views/fixtures/view_list_unclassified_filter_full.yaml
new file mode 100644
index 0000000..492ad14
--- /dev/null
+++ b/tests/views/fixtures/view_list_unclassified_filter_full.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 unclassified:
8 match-type: includeMatched
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_upstream_downstream_filter_full.xml b/tests/views/fixtures/view_list_upstream_downstream_filter_full.xml
new file mode 100644
index 0000000..160d8f5
--- /dev/null
+++ b/tests/views/fixtures/view_list_upstream_downstream_filter_full.xml
@@ -0,0 +1,30 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.UpstreamDownstreamJobsFilter plugin="view-job-filters">
13 <includeUpstream>true</includeUpstream>
14 <includeDownstream>true</includeDownstream>
15 <recursive>true</recursive>
16 <excludeOriginals>true</excludeOriginals>
17 </hudson.views.UpstreamDownstreamJobsFilter>
18 </jobFilters>
19 <columns>
20 <hudson.views.StatusColumn/>
21 <hudson.views.WeatherColumn/>
22 <hudson.views.JobColumn/>
23 <hudson.views.LastSuccessColumn/>
24 <hudson.views.LastFailureColumn/>
25 <hudson.views.LastDurationColumn/>
26 <hudson.views.BuildButtonColumn/>
27 </columns>
28 <recurse>true</recurse>
29 <statusFilter>false</statusFilter>
30</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_upstream_downstream_filter_full.yaml b/tests/views/fixtures/view_list_upstream_downstream_filter_full.yaml
new file mode 100644
index 0000000..2e56e20
--- /dev/null
+++ b/tests/views/fixtures/view_list_upstream_downstream_filter_full.yaml
@@ -0,0 +1,13 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 upstream-downstream:
8 include-downstream: true
9 include-upstream: true
10 recursive: true
11 exclude-originals: true
12recurse: true
13status-filter: false
diff --git a/tests/views/fixtures/view_list_upstream_downstream_filter_min.xml b/tests/views/fixtures/view_list_upstream_downstream_filter_min.xml
new file mode 100644
index 0000000..6fcf2a0
--- /dev/null
+++ b/tests/views/fixtures/view_list_upstream_downstream_filter_min.xml
@@ -0,0 +1,30 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.UpstreamDownstreamJobsFilter plugin="view-job-filters">
13 <includeUpstream>false</includeUpstream>
14 <includeDownstream>false</includeDownstream>
15 <recursive>false</recursive>
16 <excludeOriginals>false</excludeOriginals>
17 </hudson.views.UpstreamDownstreamJobsFilter>
18 </jobFilters>
19 <columns>
20 <hudson.views.StatusColumn/>
21 <hudson.views.WeatherColumn/>
22 <hudson.views.JobColumn/>
23 <hudson.views.LastSuccessColumn/>
24 <hudson.views.LastFailureColumn/>
25 <hudson.views.LastDurationColumn/>
26 <hudson.views.BuildButtonColumn/>
27 </columns>
28 <recurse>true</recurse>
29 <statusFilter>false</statusFilter>
30</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_upstream_downstream_filter_min.yaml b/tests/views/fixtures/view_list_upstream_downstream_filter_min.yaml
new file mode 100644
index 0000000..099189d
--- /dev/null
+++ b/tests/views/fixtures/view_list_upstream_downstream_filter_min.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 upstream-downstream:
8 include-downstream: false
9recurse: true
10status-filter: false
diff --git a/tests/views/fixtures/view_list_userrelevence_filter_full.xml b/tests/views/fixtures/view_list_userrelevence_filter_full.xml
new file mode 100644
index 0000000..9e0fce5
--- /dev/null
+++ b/tests/views/fixtures/view_list_userrelevence_filter_full.xml
@@ -0,0 +1,38 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.UserRelevanceFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <buildCountTypeString>AtLeastOne</buildCountTypeString>
15 <amountTypeString>Hours</amountTypeString>
16 <amount>1.0</amount>
17 <matchUserId>true</matchUserId>
18 <matchUserFullName>true</matchUserFullName>
19 <ignoreCase>true</ignoreCase>
20 <ignoreWhitespace>true</ignoreWhitespace>
21 <ignoreNonAlphaNumeric>true</ignoreNonAlphaNumeric>
22 <matchBuilder>true</matchBuilder>
23 <matchEmail>true</matchEmail>
24 <matchScmChanges>true</matchScmChanges>
25 </hudson.views.UserRelevanceFilter>
26 </jobFilters>
27 <columns>
28 <hudson.views.StatusColumn/>
29 <hudson.views.WeatherColumn/>
30 <hudson.views.JobColumn/>
31 <hudson.views.LastSuccessColumn/>
32 <hudson.views.LastFailureColumn/>
33 <hudson.views.LastDurationColumn/>
34 <hudson.views.BuildButtonColumn/>
35 </columns>
36 <recurse>true</recurse>
37 <statusFilter>false</statusFilter>
38</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_userrelevence_filter_full.yaml b/tests/views/fixtures/view_list_userrelevence_filter_full.yaml
new file mode 100644
index 0000000..d8bd3e3
--- /dev/null
+++ b/tests/views/fixtures/view_list_userrelevence_filter_full.yaml
@@ -0,0 +1,21 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 user-relevence:
8 match-type: includeMatched
9 build-count: AtLeastOne
10 mount-type: Hours
11 amount: 1.0
12 match-user-id: true
13 match-user-fullname: true
14 ignore-case: true
15 ignore-whitespace: true
16 ignore-non-alphaNumeric: true
17 match-builder: true
18 match-email: true
19 match-scm-changes: true
20recurse: true
21status-filter: false
diff --git a/tests/views/fixtures/view_list_userrelevence_filter_min.xml b/tests/views/fixtures/view_list_userrelevence_filter_min.xml
new file mode 100644
index 0000000..7038d73
--- /dev/null
+++ b/tests/views/fixtures/view_list_userrelevence_filter_min.xml
@@ -0,0 +1,38 @@
1<?xml version="1.0" encoding="utf-8"?>
2<hudson.model.ListView>
3 <name>list-view-name01</name>
4 <description>Sample description</description>
5 <filterExecutors>true</filterExecutors>
6 <filterQueue>true</filterQueue>
7 <properties class="hudson.model.View$PropertyList"/>
8 <jobNames>
9 <comparator class="hudson.util.CaseInsensitiveComparator"/>
10 </jobNames>
11 <jobFilters>
12 <hudson.views.UserRelevanceFilter plugin="view-job-filters">
13 <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
14 <buildCountTypeString>AtLeastOne</buildCountTypeString>
15 <amountTypeString>Hours</amountTypeString>
16 <amount>0</amount>
17 <matchUserId>false</matchUserId>
18 <matchUserFullName>false</matchUserFullName>
19 <ignoreCase>false</ignoreCase>
20 <ignoreWhitespace>false</ignoreWhitespace>
21 <ignoreNonAlphaNumeric>false</ignoreNonAlphaNumeric>
22 <matchBuilder>false</matchBuilder>
23 <matchEmail>false</matchEmail>
24 <matchScmChanges>false</matchScmChanges>
25 </hudson.views.UserRelevanceFilter>
26 </jobFilters>
27 <columns>
28 <hudson.views.StatusColumn/>
29 <hudson.views.WeatherColumn/>
30 <hudson.views.JobColumn/>
31 <hudson.views.LastSuccessColumn/>
32 <hudson.views.LastFailureColumn/>
33 <hudson.views.LastDurationColumn/>
34 <hudson.views.BuildButtonColumn/>
35 </columns>
36 <recurse>true</recurse>
37 <statusFilter>false</statusFilter>
38</hudson.model.ListView>
diff --git a/tests/views/fixtures/view_list_userrelevence_filter_min.yaml b/tests/views/fixtures/view_list_userrelevence_filter_min.yaml
new file mode 100644
index 0000000..bd55205
--- /dev/null
+++ b/tests/views/fixtures/view_list_userrelevence_filter_min.yaml
@@ -0,0 +1,10 @@
1name: list-view-name01
2view-type: list
3description: 'Sample description'
4filter-executors: true
5filter-queue: true
6job-filters:
7 user-relevence:
8 match-type: includeMatched
9recurse: true
10status-filter: false
diff --git a/tests/wrappers/fixtures/env-script001.xml b/tests/wrappers/fixtures/env-script001.xml
index 23c92e4..c286dac 100644
--- a/tests/wrappers/fixtures/env-script001.xml
+++ b/tests/wrappers/fixtures/env-script001.xml
@@ -4,7 +4,7 @@
4 <com.lookout.jenkins.EnvironmentScript> 4 <com.lookout.jenkins.EnvironmentScript>
5 <script>echo foo=bar</script> 5 <script>echo foo=bar</script>
6 <scriptType>unixScript</scriptType> 6 <scriptType>unixScript</scriptType>
7 <onlyRunOnParent>true</onlyRunOnParent> 7 <runOnlyOnParent>true</runOnlyOnParent>
8 </com.lookout.jenkins.EnvironmentScript> 8 </com.lookout.jenkins.EnvironmentScript>
9 </buildWrappers> 9 </buildWrappers>
10</project> 10</project>
diff --git a/tests/wrappers/fixtures/env-script002.xml b/tests/wrappers/fixtures/env-script002.xml
index 2c962a7..7f37cb1 100644
--- a/tests/wrappers/fixtures/env-script002.xml
+++ b/tests/wrappers/fixtures/env-script002.xml
@@ -4,7 +4,7 @@
4 <com.lookout.jenkins.EnvironmentScript> 4 <com.lookout.jenkins.EnvironmentScript>
5 <script>echo foo=bar</script> 5 <script>echo foo=bar</script>
6 <scriptType>batchScript</scriptType> 6 <scriptType>batchScript</scriptType>
7 <onlyRunOnParent>true</onlyRunOnParent> 7 <runOnlyOnParent>true</runOnlyOnParent>
8 </com.lookout.jenkins.EnvironmentScript> 8 </com.lookout.jenkins.EnvironmentScript>
9 </buildWrappers> 9 </buildWrappers>
10</project> 10</project>
diff --git a/tests/yamlparser/fixtures/string_join.xml b/tests/yamlparser/fixtures/string_join.xml
new file mode 100644
index 0000000..2abfaa2
--- /dev/null
+++ b/tests/yamlparser/fixtures/string_join.xml
@@ -0,0 +1,69 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <actions/>
4 <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
5 <keepDependencies>false</keepDependencies>
6 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
7 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
8 <concurrentBuild>false</concurrentBuild>
9 <canRoam>true</canRoam>
10 <properties>
11 <EnvInjectJobProperty>
12 <info>
13 <propertiesContent>FILE_LIST=/path/to/file1,/path/to/file2,/path/to/file3,/path/to/file4,/path/to/file5,/path/to/file6,/path/to/file7,/path/to/file8,/path/to/file9,/path/to/file10,/path/to/file11,/path/to/file12,/path/to/file13,/path/to/file14,/path/to/file15,/path/to/file16,/path/to/file17,/path/to/file18,/path/to/file19,/path/to/file20
14</propertiesContent>
15 <loadFilesFromMaster>false</loadFilesFromMaster>
16 </info>
17 <on>true</on>
18 <keepJenkinsSystemVariables>true</keepJenkinsSystemVariables>
19 <keepBuildVariables>true</keepBuildVariables>
20 <overrideBuildParameters>false</overrideBuildParameters>
21 </EnvInjectJobProperty>
22 </properties>
23 <scm class="hudson.scm.NullSCM"/>
24 <builders>
25 <hudson.tasks.Shell>
26 <command>echo &quot;Template name: string-join-data-{name}&quot;
27echo &quot;Data to be processed:&quot;
28echo &quot;${INPUT_DATA}&quot;
29</command>
30 </hudson.tasks.Shell>
31 </builders>
32 <publishers/>
33 <buildWrappers/>
34</project>
35<BLANKLINE>
36<?xml version="1.0" encoding="utf-8"?>
37<project>
38 <actions/>
39 <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
40 <keepDependencies>false</keepDependencies>
41 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
42 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
43 <concurrentBuild>false</concurrentBuild>
44 <canRoam>true</canRoam>
45 <properties>
46 <EnvInjectJobProperty>
47 <info>
48 <propertiesContent>FILE_LIST=/another/different/path/to/file1,/another/different/path/to/file2,/another/different/path/to/file3,/another/different/path/to/file4,/another/different/path/to/file5,/another/different/path/to/file6,/another/different/path/to/file7,/another/different/path/to/file8,/another/different/path/to/file9,/another/different/path/to/file10,/another/different/path/to/file11,/another/different/path/to/file12,/another/different/path/to/file13,/another/different/path/to/file14,/another/different/path/to/file15,/another/different/path/to/file16,/another/different/path/to/file17,/another/different/path/to/file18,/another/different/path/to/file19,/another/different/path/to/file20
49</propertiesContent>
50 <loadFilesFromMaster>false</loadFilesFromMaster>
51 </info>
52 <on>true</on>
53 <keepJenkinsSystemVariables>true</keepJenkinsSystemVariables>
54 <keepBuildVariables>true</keepBuildVariables>
55 <overrideBuildParameters>false</overrideBuildParameters>
56 </EnvInjectJobProperty>
57 </properties>
58 <scm class="hudson.scm.NullSCM"/>
59 <builders>
60 <hudson.tasks.Shell>
61 <command>echo &quot;Template name: string-join-data-{name}&quot;
62echo &quot;Data to be processed:&quot;
63echo &quot;${INPUT_DATA}&quot;
64</command>
65 </hudson.tasks.Shell>
66 </builders>
67 <publishers/>
68 <buildWrappers/>
69</project>
diff --git a/tests/yamlparser/fixtures/string_join.yaml b/tests/yamlparser/fixtures/string_join.yaml
new file mode 100644
index 0000000..0288d4b
--- /dev/null
+++ b/tests/yamlparser/fixtures/string_join.yaml
@@ -0,0 +1,66 @@
1- project:
2 name: string_join_example
3 jobs:
4 - 'string-join-data-{name}':
5 name: set1
6 files: !join:
7 - ','
8 -
9 - /path/to/file1
10 - /path/to/file2
11 - /path/to/file3
12 - /path/to/file4
13 - /path/to/file5
14 - /path/to/file6
15 - /path/to/file7
16 - /path/to/file8
17 - /path/to/file9
18 - /path/to/file10
19 - /path/to/file11
20 - /path/to/file12
21 - /path/to/file13
22 - /path/to/file14
23 - /path/to/file15
24 - /path/to/file16
25 - /path/to/file17
26 - /path/to/file18
27 - /path/to/file19
28 - /path/to/file20
29 - 'string-join-data-{name}':
30 name: set2
31 files: !join:
32 - ','
33 -
34 - /another/different/path/to/file1
35 - /another/different/path/to/file2
36 - /another/different/path/to/file3
37 - /another/different/path/to/file4
38 - /another/different/path/to/file5
39 - /another/different/path/to/file6
40 - /another/different/path/to/file7
41 - /another/different/path/to/file8
42 - /another/different/path/to/file9
43 - /another/different/path/to/file10
44 - /another/different/path/to/file11
45 - /another/different/path/to/file12
46 - /another/different/path/to/file13
47 - /another/different/path/to/file14
48 - /another/different/path/to/file15
49 - /another/different/path/to/file16
50 - /another/different/path/to/file17
51 - /another/different/path/to/file18
52 - /another/different/path/to/file19
53 - /another/different/path/to/file20
54
55- job-template:
56 name: 'string-join-data-{name}'
57 properties:
58 - inject:
59 keep-system-variables: true
60 properties-content: |
61 FILE_LIST={files}
62 builders:
63 - shell: |
64 echo "Template name: {template-name}"
65 echo "Data to be processed:"
66 echo "${{INPUT_DATA}}"
diff --git a/tests/yamlparser/fixtures/variable_defaults.xml b/tests/yamlparser/fixtures/variable_defaults.xml
new file mode 100644
index 0000000..74128ad
--- /dev/null
+++ b/tests/yamlparser/fixtures/variable_defaults.xml
@@ -0,0 +1,39 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <actions/>
4 <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
5 <keepDependencies>false</keepDependencies>
6 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
7 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
8 <concurrentBuild>false</concurrentBuild>
9 <canRoam>true</canRoam>
10 <properties/>
11 <scm class="hudson.scm.NullSCM"/>
12 <builders>
13 <hudson.tasks.Shell>
14 <command>echo yolo</command>
15 </hudson.tasks.Shell>
16 </builders>
17 <publishers/>
18 <buildWrappers/>
19</project>
20<BLANKLINE>
21<?xml version="1.0" encoding="utf-8"?>
22<project>
23 <actions/>
24 <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
25 <keepDependencies>false</keepDependencies>
26 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
27 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
28 <concurrentBuild>false</concurrentBuild>
29 <canRoam>true</canRoam>
30 <properties/>
31 <scm class="hudson.scm.NullSCM"/>
32 <builders>
33 <hudson.tasks.Shell>
34 <command>echo override</command>
35 </hudson.tasks.Shell>
36 </builders>
37 <publishers/>
38 <buildWrappers/>
39</project>
diff --git a/tests/yamlparser/fixtures/variable_defaults.yaml b/tests/yamlparser/fixtures/variable_defaults.yaml
new file mode 100644
index 0000000..ea25c6c
--- /dev/null
+++ b/tests/yamlparser/fixtures/variable_defaults.yaml
@@ -0,0 +1,16 @@
1- job-template:
2 name: '{name}-variable-defaults'
3
4 builders:
5 - shell: '{script|echo yolo}'
6
7- project:
8 name: default
9 jobs:
10 - '{name}-variable-defaults'
11
12- project:
13 name: override
14 jobs:
15 - '{name}-variable-defaults'
16 script: echo override
diff --git a/tox.ini b/tox.ini
index 2e641e9..66bbf24 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,11 +4,9 @@ envlist = docs, pep8, py34, py35, py36, py27, cover
4skip_missing_interpreters = true 4skip_missing_interpreters = true
5 5
6[testenv] 6[testenv]
7# Note(Vek): JJB is not compatible with a non-zero PYTHONHASHSEED
8setenv = 7setenv =
9 LANG=en_US.UTF-8 8 LANG=en_US.UTF-8
10 PYTHONDONTWRITEBYTECODE=1 9 PYTHONDONTWRITEBYTECODE=1
11 PYTHONHASHSEED=0
12 SUBUNIT_FORMATTER=tee testr_subunit_log 10 SUBUNIT_FORMATTER=tee testr_subunit_log
13 VIRTUAL_ENV={envdir} 11 VIRTUAL_ENV={envdir}
14usedevelop = True 12usedevelop = True