36 Commits

Author SHA1 Message Date
Khai Do
d6fbd4be2b add a JJB command reference
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
2014-10-21 11:32:02 -07:00
Jenkins
6c02254a0b Merge "add documentation for globbed parameter feature" 2014-10-21 17:20:40 +00:00
Jenkins
0cebf24591 Merge "add documentation for the delete command" 2014-10-21 17:15:30 +00:00
Khai Do
66261c384d add documentation for globbed parameter feature
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
2014-10-21 09:32:02 -07:00
Khai Do
55cf1ec36b add documentation for the delete command
Change-Id: Iaa84c66aab01bf404ad64e960578a913254b21e4
2014-10-21 09:28:52 -07:00
David Pursehouse
1a094c6fd2 Fix command to build docs in installation documentation
Change I1ad04bd renamed the `doc` environment to `docs` but did
not update the documentation.

Change-Id: I63cb324f222a40e91b21cc0d3b569b6352bf88b3
2014-10-21 11:02:40 +08:00
Wayne
f0e53d34a1 Accept list of paths in 'path' arg.
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
2014-10-17 07:58:59 -07:00
Darragh Bailey
38c977ceff Error on duplicate job names being found
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
2014-09-30 17:55:23 +01:00
David Caro
a70126cd94 Added recursive option
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
2014-08-29 18:41:14 +01:00
Khai Do
3dcd906880 Clarify configuration and job definition
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
2014-08-02 08:24:10 -07:00
Khai Do
848ce968e0 Replace 'Testing JJB' with the term 'Test Mode'
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
2014-08-02 07:44:52 -07:00
Darragh Bailey
3e3996d32a Use yaml local tags to support including files
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
2014-06-20 23:16:23 +01:00
Jenkins
f61b654c85 Merge "update URL references to project." 2014-06-04 09:50:51 +00:00
Marc Abramowitz
b33ac74828 Add tox "coverage" target
Change-Id: I577d62e016a550ea30671837a0a426165984e982
2014-05-27 16:50:34 -07:00
Khai Do
6eb31208fb update URL references to project.
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
2014-05-22 11:23:17 -07:00
Jenkins
90af7a8fc6 Merge "Added config options to not overwrite jobs desc" 2014-04-21 18:12:34 +00:00
Marc Abramowitz
14ed8b12d0 test command read/write stdin/stdout by default
E.g.:

    jenkins-jobs test < config/jenkins.yml

This is convenient for demoing or implementing functional tests.

Change-Id: I4e3030e261d3b90f75e4a033ea074d18764d97bf
2014-04-18 14:55:40 -07:00
David Caro
4206928c1d Added config options to not overwrite jobs desc
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>
2014-04-09 23:29:14 +01:00
David Pursehouse
dd36e35476 Minor fixes in the installation documentation
Fix a couple of grammatical errors, and wrap long lines to fit
within 80 columns.

Change-Id: Ide46f5fdc6bb2f0b759fc6e69669097d23149791
2014-04-08 11:06:22 +09:00
Marc Abramowitz
8fa82635bd Small documentation tweaks
Change-Id: I00ed518141b60dfa1c22a11edc391532bf49a0a1
2014-04-04 06:52:21 -07:00
Antoine Musso
5f96ad465b Use venv to build documentation
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
2014-03-02 10:56:40 +01:00
Jenkins
7959bf44db Merge "Enable ignore_cache flag on jenkins_jobs.ini" 2013-12-12 04:41:11 +00:00
Felipe Reyes
f24987718b Fix format in installation.rst
There was a line throwing a Warning due a badly formatted bullet point

Change-Id: Ia8b70fadfb66c4d0c10631ef4bf37f01d38b9f02
2013-12-11 16:31:05 -03:00
Yolanda Robla
b123c13e99 Enable ignore_cache flag on jenkins_jobs.ini
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
2013-12-10 12:59:13 +01:00
Khai Do
b790bbc681 update doc and add new JJB unit tests
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
2013-11-22 17:51:17 +00:00
DennyZhang
7530955593 fix typo
Change-Id: Ie8d6e35094a1bd0c970c8122b0a76bca1fba4f7f
2013-10-31 13:33:09 -05:00
Antoine Musso
f1c02f85e1 doc: fix up strict errors
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
2013-09-28 17:56:32 +02:00
Jenkins
0c730c33cf Merge "Add documentation for XDG_CACHE_HOME" 2013-09-09 22:17:46 +00:00
Khai Do
d18c3cb1f5 Add usage info to JJB documentation
Display the usage info for JJB and add it to the
sphinx docs.

Fixes bug 1221944

Change-Id: I5b36cca7a836b009bfb0ca880abbccd4477de307
2013-09-09 15:14:18 -07:00
Khai Do
73df0ac7a7 Add documentation for XDG_CACHE_HOME
This patch documents the XDG_CACHE_HOME environment variable in JJB.

Fixes bug 1193450

Change-Id: I57cf59c8723aa04e20801f32a81b573c9d096b48
2013-09-09 13:48:28 -07:00
Attila Fazekas
4d26edcb52 Installation doc setup.py
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
2013-06-10 21:57:20 +00:00
Antoine Musso
3e6dac4602 job cache now varies by remote url
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
2013-03-21 23:43:09 +00:00
Antoine Musso
4f5cfb178f update can now takes several job names
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
2013-03-18 16:12:25 +00:00
Clark Boylan
b60770597a Stop referring to openstack/openstack-ci-puppet.
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
2013-03-01 18:32:53 +00:00
Antoine Musso
3d4fb02986 jenkins user must have global read permission
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
2012-11-16 15:55:12 +00:00
James E. Blair
ab7c6bc6c1 Add documentation.
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
2012-09-17 20:25:38 +00:00