810 Commits

Author SHA1 Message Date
Marc Abramowitz
8f17894ab7 Fix "delete-all"
It was broken by 14ed8b12, resulting in:

    $ jenkins-jobs delete-all
    Traceback (most recent call last):
      File "/Users/marca/python/virtualenvs/jenkins-job-builder/bin/jenkins-jobs", line 10, in <module>
        sys.exit(main())
      File "/Users/marca/dev/git-repos/jenkins-job-builder/jenkins_jobs/cmd.py", line 143, in main
        if options.path == sys.stdin:
    AttributeError: 'Namespace' object has no attribute 'path'

Change-Id: I42a3ef9f3cfca7b4667498009351e0027aa316d7
2014-04-29 17:57:28 -07:00
Marc Abramowitz
9202e68107 Add additional yaml/xml tests, literalinclude them
instead of using inline examples in docstrings. With literalinclude, we
know the examples are tested.

Change-Id: I95fbb4726bd6731d9687d09a3d6e7d4e5a445131
2014-04-29 11:57:15 -07:00
James E. Blair
2c520ddf07 Treat ignore_cache as a boolean
When ignore_cache was loaded from the config file (including the
default config) it was treated as a string, which evaluates to
true in boolean expressions.  Therefore, unless ignore_cache was
set on the command line, it would always behave as if true.

Fix by asking configparser for a boolean value.

Change-Id: I63af8637671248fc1a6895d1eb82f1c2e24ce5c2
2014-04-29 11:44:55 -07:00
Marc Abramowitz
a0dac0f4e7 Add more tests
Change-Id: Ie0e0e3906edaa278805917e6303b1d5f1daba864
2014-04-29 10:34:22 -07:00
Jenkins
2b2037d878 Merge "add tests for shell builder" 2014-04-29 08:43:37 +00:00
Jenkins
ecaf1313eb Merge "Add some more Trove classifiers" 2014-04-29 08:19:59 +00:00
Jenkins
ff4144f2cb Merge "Update authorship information" 2014-04-29 02:23:58 +00:00
Marc Abramowitz
0016813b8a Add some more Trove classifiers
Change-Id: I803813de2980f8ca484710fecc1c6674b7497206
2014-04-28 11:59:33 +02:00
Alexandre Conrad
2ae9c25cef add tests for shell builder
Change-Id: I37350e7e813db173e033bd4131e62be77ab9753a
2014-04-26 18:07:34 -07:00
Alexandre Conrad
bd4bbaf3c0 add support for python builder
Change-Id: I0b1711c04435287bb851a72df25ebba10c891831
2014-04-26 18:04:44 -07:00
Marc Abramowitz
2ef117d5fd Catch EPIPE exception and return
Otherwise you get a traceback if you pipe `jenkins-jobs` to the UNIX
`head` command.

Change-Id: If83fd5b9f4aacd031e9ab0c35d61cc6d57542be9
2014-04-26 09:57:31 -07:00
Monty Taylor
8a138c9211 Update authorship information
It's been quite some time since the author of the entire package
has been HP. Update the setup metadata to reflect this.

Change-Id: I239246eb1ac0ca659d1a118a0e009ab224bc6758
2014-04-26 00:04:46 +02:00
Jenkins
c68249a7f1 Merge "add timeout-var option to the timeout module" 2014-04-25 19:28:58 +00:00
Joao Vale
93a9ddcff9 Fail if specified set of defaults is not found.
Change-Id: I1c764d5585249b28bd25f775abee2734e96b1640
2014-04-25 11:55:13 +01:00
Jenkins
a9fb1bec14 Merge "Added support for Exclusion plugin" 2014-04-23 15:14:56 +00:00
Jenkins
0bb2337d57 Merge "Add support for multiple Gerrit servers in Gerrit trigger" 2014-04-22 23:43:40 +00:00
Jenkins
36cffd95ce Merge "SCM module: Add support for multiple Git remotes." 2014-04-22 20:20:32 +00:00
Jenkins
b92103607f Merge "README.rst: Add links" 2014-04-22 20:20:26 +00:00
Jenkins
abbf318c4d Merge "Enhance coverage for builder trigger-builds" 2014-04-21 23:46:26 +00:00
Jenkins
90af7a8fc6 Merge "Added config options to not overwrite jobs desc" 2014-04-21 18:12:34 +00:00
Khai Do
f59ebc1cf9 add timeout-var option to the timeout module
jenkins build-timeout plugin version 1.13 has a new option[1] to expose the
timeout value via an environment variable.  Adding this option to the
equivalent jjb module.  Also created tests for the examples.

[1] https://github.com/jenkinsci/build-timeout-plugin/pull/22

Partial-Bug: #1287883
Change-Id: Ia0d6570e9aae55ceadf076716fc8ad7688ff6214
2014-04-21 10:16:22 -07:00
Brad P. Crochet
153fa6e2b1 Added support for Exclusion plugin
This plugin allows the specification of critical blocks for builders.
Once a set of builders is "wrapped" by a critical block start/critical
block end pair, any resources (string) specified in the exclusion build
wrapper will cause any jobs with those same resources to block and allow
only one of those builds to proceed at a time.

Change-Id: I0bf4ab003709917aa7fe6ad57b31200f466658da
2014-04-21 13:14:47 -04:00
David Pursehouse
3d1f134b45 Add support for multiple Gerrit servers in Gerrit trigger
Since version 2.11.0 the Gerrit Trigger Plugin can be configured
to trigger on more than one server.

Change-Id: I2082c5cfd14cd2494e2a7192beeb4909552cb7f6
2014-04-21 09:27:17 +09:00
Jenkins
760873403b Merge "test command read/write stdin/stdout by default" 2014-04-20 04:12:54 +00:00
Jenkins
8d68281c5e Merge "README.rst: Note GitHub PRs are auto-closed" 2014-04-20 04:03:51 +00:00
Marc Abramowitz
3beff4d255 README.rst: Note GitHub PRs are auto-closed
This makes it a little bit clearer that GitHub pull requests are not
accepted and will be automatically closed.

This is a small tweak to help with one of the issues mentioned here:

http://www.alexconrad.org/2014/04/the-painful-process-of-submitting-your.html

Change-Id: Ie4aa8297a75f00ddd9e6c0fce722aa7a6586d52d
2014-04-19 20:28:54 -07:00
Jenkins
fb76c08982 Merge "Sort ant builders settings for consistency" 2014-04-20 01:59:31 +00:00
Jenkins
40b6707ae6 Merge "Support the Post Build Script plugin" 2014-04-19 21:25:55 +00:00
Marc Abramowitz
288938ab72 README.rst: Add links
Change-Id: Ia784781c9142f7a9deaeef812c6c95a936342f3a
2014-04-19 08:48:53 -07: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
Jenkins
ad43311203 Merge "Support Fitnesse results publisher" 2014-04-18 16:42:40 +00:00
Jenkins
4ba0d42ace Merge "Allow to specify multiple branches per project in Gerrit trigger" 2014-04-18 16:39:25 +00:00
Jenkins
c1fcd97fc4 Merge "Make logger available during tests" 2014-04-18 16:38:36 +00:00
Jenkins
69dd15f8aa Merge "Add support for the Jenkins Doxygen publisher plugin." 2014-04-18 16:16:31 +00:00
Jenkins
e625766101 Merge "Add hacking to requirements" 2014-04-18 12:36:03 +00:00
Florian Preinstorfer
e4c920833b Add support for the Jenkins Doxygen publisher plugin.
Change-Id: I0e8f9ee13b7e6fb22e1a5e4bb613b44ae6927e86
2014-04-18 08:52:03 +02:00
David Pursehouse
bb2a4effa4 Allow to specify multiple branches per project in Gerrit trigger
Allow to specify multiple branch patterns in a 'branches' block
within the 'project' block.

If no 'branches' block is present, fall back to using the single
branch specified directly in the 'project' section.

If a branch is specified both at the project level, and in the
'branches' section, ignore the one at project level.

Closes-Bug: #1302502
Change-Id: I1fb2ce0bb3776d365f2c0e98a703c6dfba5fac7f
2014-04-17 12:25:08 +09:00
Antoine Musso
1d84f6ff54 Zuul parameter ZUUL_URL
Zuul 2.0 passes to jobs an additional parameter ZUUL_URL which instructs
workers from where to clone repositories.

This is NOT the same as the zuul-url defined by Jenkins Job Builder
which is the notification endpoint set on the jobs and is unrelated.

Change-Id: I4924a5b7ae99571efd70eeb188ddd3d821a4c61b
2014-04-16 21:08:15 +02:00
James E. Blair
6067cc712c Add hacking to requirements
Solely for the transitive dependencies.  Ignore errors from hacking
as do the other openstack-infra python projects.

Change-Id: Ib5953c31a5380f9f57c7f79e1ce0699aef5eb629
2014-04-16 10:37:12 -07:00
Randy Coulman
a6e71c0e06 Support Fitnesse results publisher
Change-Id: Ide61f53df1ff8b9bd4d4c67abcad7b485387f44e
2014-04-15 08:51:17 -07:00
Florian Preinstorfer
e0549303e7 Create the output_dir for the test subcommand.
This change creates the output directory for the test subcommand if it
does not yet exist. If it exists, use it. Any other exceptions are
re-raised.

Change-Id: I487c69e70f9b6c475691ca4fef4669a0c318ab55
2014-04-15 16:13:27 +02:00
Jenkins
8d74c20240 Merge "add ability to parse from a file object" 2014-04-14 18:30:54 +00:00
Alexandre Conrad
a6194c582e add ability to parse from a file object
Change-Id: I4f62fad4d2c0e361eddaed6d4db2faa655bd4b11
2014-04-13 18:31:37 -04:00
Jenkins
dcf3d7b084 Merge "Allow 'Build on the same node' in trigger-builds builder" 2014-04-12 18:02:20 +00:00
Jenkins
a561a92aa0 Merge "Tests for checkstyle publisher" 2014-04-12 17:59:27 +00:00
David Pursehouse
b49d6a299b Make logger available during tests
If any tests exercise code paths that emit logs, a warning is
displayed:

  No handlers could be found for logger "jenkins_jobs.modules.NAME"

Set up a logger with default configuration in the base test
class.  Now any logs will be displayed on the console.

Change-Id: Ib36afd5d96ff8e7fed110b6bedb6e281aac584f8
2014-04-11 17:43:01 +09:00
Jenkins
08060a1037 Merge "Make overrideDefaultExcludes line into 3 lines" 2014-04-10 04:05:03 +00: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
Marc Abramowitz
d51ac9984d Make overrideDefaultExcludes line into 3 lines
for improved readability.

Manually clean up some hard-to-read XML code in
jenkins_jobs/modules/publishers.py that was trying to do a lot on one
line.

Change-Id: Ica0065aae6f2fbaf8755bd8b5d3dea8c7d5a9cb0
2014-04-09 13:25:54 -07:00
Marc Abramowitz
02d19a366d Make all help text start with lowercase letter
to match "show this help message and exit" text from argparse.

Change-Id: I8d5a39e704a07b8b95ab530a72249fd62e42a480
2014-04-09 11:10:33 -07:00