When parsing yaml files, any duplicate macros, job-templates, job-groups
or jobs should be considered an error by default, but provide a config
option for this to be ignored.
Need to check for seen jobs twice, when processing job groups listed
under projects and again the jobs have been generated from templates.
Use a set and store each job name generated and check on the next
iteration.
Finally walk the list of generated jobs and check if any duplicates are
encountered.
Also ensure that if the user wishes for duplicates to be ignored that
the last defined job replaces the earlier one.
Change-Id: Id31ef33ae1b2469f7c3eeabe77420377978fa35e
Current sample file lacks section about hipchat. Add section
with dummy token to show hipchat usage.
Added that into default config file for cmd.py, that is the
one used for testing. This will allow to properly test
jobs with hipchat module enabled.
Closes-Bug: #1366063
Change-Id: If511486a69113a4b4300cdb3602154ef261bc18a
Now you can organize your yaml files into subdirectories and apply them
all just passing --recursive option or adding the proper configuration
file option.
In adding support for multiple paths the Builder.load_files method was
reworked to be backward compatible with individual paths or file-like
objects, while also now handling being passed a list of paths or
file-like objects to be parsed.
Change-Id: I126751e347622716c592c6ed1a57b8acb7bf79a4
Add support for local tags which are application specific to allow
including of other yaml files or code from scripts. Allows for code to
be maintained and tested as seperate files, as well as reduces
duplication of yaml code that cannot be macro'ed or easily templated by
including it from a common file.
Adds support for the following tags:
'include' - load file as yaml code
'include-raw' - load file as data (for scripts)
'include-raw-escaped' - load file as data with escaping braces '{}'
as default for use with job-templates
Use configuration file options to provide a search path for the files.
- Test behaviour of yaml tags independent of any XML generation
by comparing json result of yaml parsing to verify that certain
tags do/don't recall the yaml.load() method.
- Add examples for the include tags via addition tests for YamlParser
class
Inspired by
http://stackoverflow.com/questions/528281/how-can-i-include-an-yaml-file-inside-another
Change-Id: Ib90a07043112d4739d6529ceddbc9817668bcec0
When you do not specify any description for a job, right now it creates a
new one overwriting whatever you had put there manually. Now when
setting the configuration option 'keep_descriptions' to True, it will
only overwrite the description if you specified one explicitly in the
yaml.
That way you can avoid specifying any description and it will not
overwrite the ones you put there manually through the jenkins ui.
Added a couple of tests for it also, and extended the tests to allow custom
configuration by adding a *.conf file for it
Change-Id: I408f5ee06a6939a8cb8f4f2e6c6e0d060462259c
Signed-off-by: David Caro <dcaroest@redhat.com>
Parses jenkins_jobs.ini to look for an ignore_cache flag.
If ignore_cache command line option is sent, it takes priority
over the jenkins_jobs.ini configuration.
Change-Id: I88f1ce1aa0d3e0ad25d592d3ca44a022ec9249c3
Closes-Bug: #1193444
Change-Id: I8fb296b1b8b17261c46df1eb062ec52d2559307b
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-on: https://review.openstack.org/15035
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins