193 Commits

Author SHA1 Message Date
Christian Fetzer
367f13927a Add support for the Jenkins Valgrind publisher plugin.
Change-Id: Id5d460a8432b2ab875e8e7063f459ef15b942284
2014-08-25 23:29:49 +02:00
Jenkins
8a6f7e1f5b Merge "Test defaults honors project variables" 2014-07-27 00:13:03 +00:00
Jenkins
6ae5c84699 Merge "Add support for 'ignore-notify' in git SCM" 2014-07-27 00:06:11 +00:00
Christian Hofstaedtler
8999a87c13 Add support for 'ignore-notify' in git SCM
This option is named "Don't trigger a build on commit notifications"
in the Jenkins Web UI.

Change-Id: I338af61f8bfdef1545d1ea206e6874cda38957cd
2014-07-27 00:41:04 +02:00
Antoine Musso
bcbfda844b Test defaults honors project variables
The defaults can make use of variables passed by the project and I am
taking advantage of that feature in my templates.

With 70ed2236 / https://review.openstack.org/#/c/85336/ there is a
regression which cause the test to fail although it pass with parent
commit d833015.

Change-Id: I57d023657eec4f6f8f29980100185fcfd7e77b1f
2014-07-24 15:54:13 +00:00
Antoine Musso
ab434cc288 Revert "Allow using template variables in "defaults" field."
This reverts commit 70ed22362a9c13ea9f3165e5747dcca281ad439c.

I knew I should have tested the patch with my own templates. Doing so I
discovered a nasty regression:

The defaults can make use of variables passed by the project. By moving
applyDEfaults to be called after deep_format is performed on job
templates, any substitutioncontained withing defaults is no longer
correctly replaced by project parameters.

Change-Id: I69ffb3e28093af6db62962786d9275bf3ba4e115
2014-07-24 15:54:07 +00:00
Jenkins
442d5c8a2c Merge "Show usage of job-group" 2014-07-23 16:27:57 +00:00
Jenkins
5939c4eed5 Merge "Add support for reverse build trigger" 2014-07-22 15:49:11 +00:00
Jenkins
ef016d5601 Merge "add logfilesize plugin support (doc, tests)" 2014-07-19 06:12:28 +00:00
Vitaliy Lotorev
97a3e75e7e add logfilesize plugin support (doc, tests)
Change-Id: I3349668420d7216b1f8ecf0a539eb944d0dd69be
2014-07-19 00:42:14 +04:00
Jenkins
66a4faa22f Merge "tests for JJB command processing" 2014-07-18 01:30:18 +00:00
Jenkins
a9d16eabb4 Merge "Add Gitlab Merge Request trigger" 2014-07-16 14:18:09 +00:00
Christian Hofstaedtler
41af1b9e98 Add Gitlab Merge Request trigger
Change-Id: Ic068cf7e89be76f0f9e9187caf628fa49d7bd7fd
2014-07-15 14:10:29 +02:00
Darragh Bailey
f89fac42cf Show usage of job-group
Make sure the example referenced in the documentation for ``Job Groups``
actually makes use of 'job-group'.

Change-Id: Ib78bdb459db23f57093c1fd4a6dd74a5080dc239
2014-07-12 20:58:27 +01:00
Jenkins
0af8f2f2a7 Merge "Support the Store SCM plugin" 2014-07-11 11:09:06 +00:00
Jenkins
4e2e22959f Merge "Add support for Managed Script Plugin" 2014-07-10 16:36:49 +00:00
Randy Coulman
1dc925acd9 Support the Store SCM plugin
Change-Id: I9525a29e54f157c90cf98eb7f351b56d063d87dd
2014-07-10 09:36:44 -07:00
Jenkins
8356a907ae Merge "Change default Reply-To header to $DEFAULT_REPLYTO." 2014-07-10 16:25:16 +00:00
Jenkins
7204ec3130 Merge "multijob: added kill-phase-on option" 2014-07-10 16:18:07 +00:00
João Cravo
57501a94f3 Add support for reverse build trigger
Change-Id: I06d9969df0e9edfca2a2b433e2a13e3bc10c8b2c
2014-07-10 11:10:47 +01:00
Khai Do
1df929c58a tests for JJB command processing
Add a few tests for JJB command processing.  This is just to get
started I'm hoping more will come.

Change-Id: Iff964af025f6a3d7ba4acd91b1e0242285a11bc3
2014-07-09 08:55:10 -07:00
Dzmitry Horbach
15282bdd3d Add support for Managed Script Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Managed+Script+Plugin

Change-Id: Ic37f02886f242f5ff31a7421e699b85227c5264f
2014-07-08 13:44:05 +03:00
João Cravo
04139e0f5e Add support for builder Groovy and System Groovy
Closes-Bug: #1251869
Change-Id: Ibc49e1aca7b33eb9c0c21472a924cb375069ee51
2014-07-07 17:39:07 +01:00
Randy Coulman
5374e3c54b Change default Reply-To header to $DEFAULT_REPLYTO.
See also https://issues.jenkins-ci.org/browse/JENKINS-17733.

Change-Id: I97c2f2824a8fa74f6387301d29594c59cd73a45a
Closes-Bug: 1290382
2014-07-07 08:09:37 -07:00
Jenkins
e1ddd23483 Merge "Allow using template variables in "defaults" field." 2014-07-07 10:11:26 +00:00
Joao Vale
70ed22362a Allow using template variables in "defaults" field.
Change-Id: I876ab7fa61258e84b00a67325aeb9234aff8fa62
2014-06-27 18:09:20 +01:00
Lukas Bednar
fa8ae1c60f multijob: added kill-phase-on option
this option allows terminate job phase on specific status of job

Change-Id: I5984fb2494120afc97140c1ae38635301e8f1376
Signed-off-by: Lukas Bednar <lbednar@redhat.com>
2014-06-27 14:08:43 +02:00
Jenkins
f0de64a1a2 Merge "Use yaml local tags to support including files" 2014-06-25 17:50:11 +00:00
Jenkins
eef226d370 Merge "add presend-script to email-ext" 2014-06-23 18:47:16 +00:00
Darragh Bailey
6d311095ef Fix ant builder definition in complete test
Change-Id: I8f6041c0aa2b7a24d2dc8ed73b2719c332b869e6
2014-06-21 21:57:27 +01: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
Jaroslav Henner
53022c70e7 add presend-script to email-ext
Change-Id: I388dd2f5ce8aa6ac323f73409dec1003a3f423cb
2014-06-19 11:06:39 +02:00
Jenkins
463c84f055 Merge "Adding second failure option to the email-ext module" 2014-06-19 09:05:06 +00:00
David Johansen
d1aecb185d Adding second failure option to the email-ext module
Change-Id: I288289e8227c3408f40f0e8272573d20e022ae70
2014-06-11 11:42:25 -04:00
Jenkins
de43eaddf7 Merge "Support variable-specific substitutions in templates." 2014-06-11 09:27:37 +00:00
Fathi Boudra
c5d3e71cca matrix project: add support for dynamic axis
This axis requires the dynamic axis plugin:
https://wiki.jenkins-ci.org/display/JENKINS/DynamicAxis+Plugin

All the dynamic axis plugin settings are in the core project:

<matrix-project>
  <axes>
    <ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis>
      <name>config</name>
      <values>
        <string>config_list</string>
      </values>
      <varName>config_list</varName>
      <axisValues>
        <string>default</string>
      </axisValues>
    </ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis>
  </axes>

The plugin sets 2 values: axis name and variable name.
The axisValue element is hardcoded to 'default' in the plugin, so we do
the same in Jenkins job builder.

The matrix project supports multiple axes configuration, including dynamic
axis.

Tests added for:
 * dynamic axis (by itself)
 * multiple axes (dynamic and user-defined axes)

Tested on Jenkins LTS (1.554.2) with both the plugin installed and not
installed. The plugin is properly ignored in the latter case.

Change-Id: I36310bc512fd873fec4bd5f42937689fd178536e
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
2014-06-06 11:02:39 +03:00
Fathi Boudra
c6c81a2965 authorization property: add extended read support
This authorization requires the extended read permission plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Extended+Read+Permission+Plugin

Include test for the authorization properties.

Change-Id: I9364524398f4e3f0d6ccccd88d5046e7504e2123
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
2014-06-02 07:39:25 +03:00
Lukas Bednar
34ea32ba80 scms: MultiSCM is generated for scms hidden in macro
This patch fixes problem with generating MultiSCM in case that scms are
encapsulated in macro.
This patch includes simple tests to cover if-branches for this change.

Example:

- scm:
  name: xxx
  scm:
    - git: ...

- scm:
  name: yyy
  scm:
    - git: ...

- scm:
  name: xxx-and-yyy
  scm:
    - xxx
    - yyy

- job:
  name: my-job
  scm:
    - xxx-and-yyy

Change-Id: If3e7b3d19e51545a5623ee060fb7673a7a989233
Signed-off-by: Lukas Bednar <lbednar@redhat.com>
Closes-bug: #1285515
2014-05-26 17:49:04 +02:00
Jenkins
95be361ba9 Merge "Test creation of multiple jobs from templates" 2014-05-20 22:18:18 +00:00
Joao Vale
2de0e0e7df Support variable-specific substitutions in templates.
Change-Id: I6af84f48eaa4ee44c8d8babddd8d10a1e1095101
2014-05-12 15:03:10 +00:00
David Pursehouse
aef2d27dce Add support for triggering on unreviewed patches
Since version 2.11.0 the Gerrit Trigger Plugin can be configured to
generate patchset-created events for changes that were uploaded while
the connection to Gerrit was down.

Change-Id: I59608e4f01355944fed9e44b288fc25a897950c7
2014-05-12 06:59:20 +00:00
Darragh Bailey
07c5bd1cc3 Test creation of multiple jobs from templates
Concatenate each job XML created from the parsed yaml when using the
YamlParser class for testing. Ensures that multiple jobs created from a
single yaml file can be tested.

Remove erroneous multiple job from scm_remote_deep_bug test.

Change-Id: I2732a7303fefff1f321a1a5b7eef9144d168e39a
2014-05-10 22:21:06 +01:00
Jenkins
bf56d3ab36 Merge "Fix recursion depth error caused by Git-remotes" 2014-05-05 18:13:56 +00:00
Jenkins
3d22143bdb Merge "Checkstyle publisher did not honor 0 values" 2014-05-05 17:49:02 +00:00
Jenkins
8fe3061876 Merge "Allow custom settings configs for maven projects" 2014-05-02 20:00:42 +00:00
Antoine Musso
30598272f6 Checkstyle publisher did not honor 0 values
The Checkstyle publisher would not honor value of 0 and instead emit
an empty XML element.  This was due to the 'if someval' which would be
false whenever someval is 0.  Adjusted tests to match the new (and
correct) behavior.

While at it slightly simplified the repeating logic in checkstyle
publisher.

Change-Id: I7443b93aa116dc049de565ff96ca40526b390409
2014-05-02 19:26:55 +00:00
Jenkins
9e2fdcdacf Merge "support execute-on for postbuildscript" 2014-05-02 16:47:44 +00:00
Pavel Sedlák
20acdc5e90 Fix recursion depth error caused by Git-remotes
In "SCM module: Add support for multiple Git remotes."
(change Ifef2da85, commit 8a956bcc) there is
recursive dict creation introduced when git repo
does not have any remote configured explicitely in yaml.

But infinite recursion confuses builder.deep_format,
so when defaults section contains scm git entry without
remotes specified, and is used by both:
- single job section (which creates the recursive dict),
- job template (which makes deep_format called on that dict)
it fails on RuntimeException.

Tried to build xmls localy with for example
'test -o /tmp/jobs' action.

Traceback looks like:
 File "/jenkins_jobs/cmd.py", line 168, in main
   output=options.output_dir)
 File "/jenkins_jobs/builder.py", line 583, in update_job
   self.parser.generateXML(names)
 File "/jenkins_jobs/builder.py", line 241, in generateXML
   self.getXMLForTemplateJob(d, template, jobs_filter)
 File "/jenkins_jobs/builder.py", line 260, in getXMLForTemplateJob
   expanded = deep_format(template, params)
 File "/jenkins_jobs/builder.py", line 99, in deep_format
   ret[item.format(**paramdict)] = deep_format(obj[item], paramdict)
 File "/jenkins_jobs/builder.py", line 95, in deep_format
   ret.append(deep_format(item, paramdict))
 File "/jenkins_jobs/builder.py", line 99, in deep_format
   ret[item.format(**paramdict)] = deep_format(obj[item], paramdict)
 File "/jenkins_jobs/builder.py", line 99, in deep_format
   ret[item.format(**paramdict)] = deep_format(obj[item], paramdict)
 File "/jenkins_jobs/builder.py", line 95, in deep_format
   ret.append(deep_format(item, paramdict))
 File "/jenkins_jobs/builder.py", line 80, in deep_format
   if isinstance(obj, str):
 RuntimeError: maximum recursion depth exceeded while calling a Python object

Obj passed to deep_format may look like:
    {'origin': {'basedir': 'our-repo',
                'branches': ['origin/master'],
                'remotes': [<Recursion on dict with id=26090448>],
                'url': 'https://our-gerrit.com/our-repo'}}

This patch changes the code to use copy of the git repo dict,
as data for in-place creation of remotes/origin entry,
and as it does not contain 'remotes' key yet, it does not create loop.

Change-Id: Iacd15839c5741cb171253fe45bdd122d7927aa39
2014-05-02 12:39:58 +02:00
Alexandre Conrad
a694c5dc4d support execute-on for postbuildscript
Change-Id: Iccf1fc6bc98f0e78cafc6184b64844be6eba19b8
2014-05-01 06:55:36 -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