I've noticed that people don't necessarily know about the sub options
in JJB so adding a command referencing showing all command options
will hopefully help.
Change-Id: Id0f786077e1e5a35db5ab45e0e2c3760ac11ded0
change I5bb1074 added a globbed parameter feature for updating and
deleting JJB jobs but did not provide documentation for it.
Hopefully this change will help users discover this feature.
Change-Id: I6e527c818f25a5aa061a19308f22495221e3dc93
This adds the behavior of splitting the path positional argument on colons then
processing each resulting string the same way that the path was being processed
previous to this commit.
* Adds a unit test to validate correct `path` parsing.
* Adds a unit test to validate correct `path` parsing in the recursive case.
* Documents the new behavior.
Change-Id: I0f465e02077569352cd276a8366ead5bab0eb117
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
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
The docs was a little confusing in that used a single term 'configuration' to
referred to both the JJB global configuration and the job definitions.
This change clarifies that by changing 'configuration' in a few places
to 'job definition' to make it less confusing.
Change-Id: Ie64e7d899b793c9c8e86e51076c020640e336a40
The term 'testing' is overloaded. I thought it meant running the actual
JJB tests instead of running the JJB application. I think a good way to
distinguish the two is to use the term 'test mode' when it's in the
context of running the JJB application with the 'test' parameter.
I've already been using the term 'run in test mode' quite a bit in
my JJB reviews to distiguish it from the actual JJB tests.
Change-Id: I2076189e3ae55caa20d0894fb20859a7c461e46a
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
github.com/openstack-ci was moved to github.com/openstack-infra
homepage references should point to git.o.o/cgit/openstack-infra
This change updates the above references accordingly.
Change-Id: I4d3591f228b10de050a129ae7af99485f50edab5
E.g.:
jenkins-jobs test < config/jenkins.yml
This is convenient for demoing or implementing functional tests.
Change-Id: I4e3030e261d3b90f75e4a033ea074d18764d97bf
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>
The Sphinx documentation now make use of the `program-output` plugin
which would invoke commands to generate inline documentation. Ex:
program-output:: zuul --help
program-output:: zuul enqueue --help
We want the resulting output to correspond to Zuul source code, not the
command which is currently installed on the host running the doc. On my
setup sphinx would die out because it cant find the command 'zuul'.
The new tox environement 'doc' runs sphinx in a virtual env which will
have the proper zuul command.
The generated doc is not written under the /.tox directory but to
/doc/build/html for convenience.
Example usage:
tox -edoc && open doc/build/html/index.html
Change-Id: Ib0170f94bb2c09eb60e555a32e101e2e0959b18e
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
Add documentation on how to generate documentation and run JJB unit tests.
Also added a unit tests for each category of plugins as examples for others
to follow when adding new JJB plugins. I'm hoping this will help contributors
add tests for new plugins going forward.
Change-Id: I2ab90cdb37d0f3b1e947345d4291d2927b04a0c6
Running Sphinx 1.2b1 running in strict mode (-W), yields three different
errors:
* .. Running:: is an unknown command, uses '.. rubric::' instead
* double stars '**' needs either to be escaped with backslashes or
quoted literrally with double backquotes
* nested lists needs newlines before and after for some reason.
Change-Id: I8680aef7306c619c817c637882715f5a7d08c5d9
The setup.py is not executable and does not contains #! sign at the
beginning.
Change-Id: I6f3aa542eb883ade0650a33f31a8b5ffaff9a615
Reviewed-on: https://review.openstack.org/32318
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
When updating different Jenkins installations, JJB would end up
invalidating the job cache. By adding the jenkins.url in the cache file
name, we can maintain a job cache per remote Jenkins instance.
Name of the cache file is based on Jenkins URL.
Change-Id: Ib9c08d8029267729e7a030a4e8bc0a9f05eb8ce3
Reviewed-on: https://review.openstack.org/24404
Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
Just like `delete` can accept several jobs names as argument, this patch
let us do the same with `update`.
* builder.update_jobs now filter the jobs against a list
* renamed 'update' argument 'name' to 'names' to make it clear it
accepts several job names.
Change-Id: I4bcebd98073ec89e172afbec59b93d14de6620ff
Reviewed-on: https://review.openstack.org/24160
Reviewed-by: Anita Kuno <akuno@lavabit.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
The openstack/openstack-ci-puppet repo moved and became
openstack-infra/config. Remove references to openstack-ci-puppet and
replace them with references to openstack-infra/config.
Change-Id: I75e7797995b894b6053901dbcfa351404048ea7c
Reviewed-on: https://review.openstack.org/23227
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Change-Id: I467f2b8ca5fcffc118c1bdc3d5dee04c309ac70f
Reviewed-on: https://review.openstack.org/16170
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
Move test.sh to the tools directory.
Move parameters and notifications to their own modules; even
though they are implemented as Jenkins properties, they make
more sense as separate entities in the job builder, because
that's they way they are specified in the YAML. All three
modules that touch the properties xml object know how to
create it if it's missing.
Change-Id: I4b42ff10a93fd3ed98f632b58e47f3e0e45086d6
Reviewed-on: https://review.openstack.org/12741
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins