810 Commits

Author SHA1 Message Date
Jenkins
0691cfa1d2 Merge "remove misleading jjb example" 2014-06-11 19:24:01 +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
Jenkins
83a54ac7a2 Merge "matrix project: add support for dynamic axis" 2014-06-11 09:05:14 +00:00
zaro0508
b38c5e46ac re-arrange docs for clarity
The info on using list and dict as parameters seemed a little too advanced
to be in the description of 'templates'.  This change moves this example into
a newly created 'advanced' configuration section.

Change-Id: I98b80233c45ac721819360743dcae5e82c63ecbf
2014-06-06 09:55:47 -07:00
Khai Do
2d1494d3a3 remove misleading jjb example
Change I059f38d0aa8a8947aaac75e0ddb34d392063ece3 added support for
passing parameters to jobs in groups but not for variable substitution
on those parameters. Substitution on job list parameters would
be a new feature. This change removes a misleading parameter subsitution
example.

Partial-bug: #1298568
Change-Id: I18e28bb622f0473f049963ce6dcf6c4efd11dc2c
2014-06-06 09:30:17 -07: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
Khai Do
d96d351868 removed job configuration duplication in docs
The same job definition and examples were in both general.rst and
configuration.rst.  Moved the contents of general to configuration.

Change-Id: Iefdf1b6ac3b9679a8af4451710442bf58054d790
2014-06-05 11:16:01 -07:00
Fathi Boudra
4f403ca884 ssh publisher: add always-publish-from-master support
Allow to SSH from master, instead of hardcoding to false.
It's particularly useful when the SSH credential are only
stored on the master. Default is kept to False.

Change-Id: I365cad043d30b6b290828a24635322c7f5afc35e
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
2014-06-05 20:30:10 +03:00
Jenkins
3696fdaba2 Merge "reference tests as examples" 2014-06-04 20:52:50 +00:00
Jenkins
428a2369bb Merge "authorization property: add extended read support" 2014-06-04 18:07:38 +00:00
Jenkins
f61b654c85 Merge "update URL references to project." 2014-06-04 09:50:51 +00:00
David Caro
dcb29a8c77 Fixed referenced before assignment in zuul module
It was using a non-defined url variable and failed to me when running a
simple jenkins-jobs test -o ../outdir .

Change-Id: I56e6376de4972ea0f64bd8c81d6eb6d8f7f6d497
Signed-off-by: David Caro <dcaroest@redhat.com>
2014-06-03 07:41:54 +00: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
Khai Do
f594fb5c7c reference tests as examples
Remove samples and reference the tests as examples instead.

We don't need these samples for two reasons:
1. It is already duplicated in either JJB tests or documentation.
2. We don't test these samples so they may become outdated (some already have).

Change-Id: If1ba6cc8a675091e740fa254951bb8fcbcee6903
2014-05-29 09:30:49 -07:00
Jenkins
e07f6e7e69 Merge "Add tox "coverage" target" 2014-05-28 18:50:33 +00:00
Jenkins
24ce90ea84 Merge "Fail if specified set of defaults is not found." 2014-05-28 01:49:57 +00:00
Marc Abramowitz
b33ac74828 Add tox "coverage" target
Change-Id: I577d62e016a550ea30671837a0a426165984e982
2014-05-27 16:50:34 -07: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
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
564953609c Merge "add overview info to pypi" 2014-05-21 22:55:33 +00:00
Jenkins
95be361ba9 Merge "Test creation of multiple jobs from templates" 2014-05-20 22:18:18 +00:00
Khai Do
5eb5bd1a9c add overview info to pypi
pypi is not showing info from README.rst. This change adds a reference to the readme
so that it will appear on pypi.org upon a release of jjb.

Change-Id: I13b8d003d358bc1398058bbdbb5bb984ead2679b
2014-05-20 10:39:44 -07:00
Jenkins
8ae49cc1b5 Merge "Add support for triggering on unreviewed patches" 2014-05-17 19:36:49 +00:00
Jenkins
bd8e5911c7 Merge "Fix typo: sigleton => singleton" 2014-05-16 17:58:20 +00:00
Jenkins
ad27fe00a0 Merge "Refactor the matches function" 2014-05-15 20:15:25 +00:00
Marc Abramowitz
b0d58bb13b Fix typo: sigleton => singleton
Change-Id: I7ef7b73b22d722663b4fa5dcd0d79db2a4ca24e4
2014-05-14 17:37:05 -07: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
Darragh Bailey
678912e137 Patch writexml for non standard XML DOM implementations
PyXML will replace the default DOM implementation and as a result, it
will reintroduce the broken writexml method that was present with python
versions before 2.7

Change-Id: I8847c344df2f7b2d76291a24cdb8e1a436ac87ec
2014-05-10 21:36:23 +01:00
Jenkins
8cbc93a026 Merge "Zuul parameter ZUUL_URL" 2014-05-07 00:20:23 +00:00
Jenkins
c79955426e Merge "Modularize to enable easier testing" 2014-05-05 23:09:29 +00: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
Marc Abramowitz
01deac71c8 Refactor the matches function
- Clearer parameter names and doc string
- Use fnmatch.fnmatch instead of re.match and fnmatch.translate
- Use `any` to make code more succint.

Change-Id: Id22aef35554c2a3428874f956c54baae3ea662fe
2014-05-04 01:12:45 -07:00
Marc Abramowitz
de1041213e Modularize to enable easier testing
Change-Id: I85c5d95658c0be57c4ce87fac53556475ae53207
2014-05-03 14:37:55 -07:00
Jenkins
8fe3061876 Merge "Allow custom settings configs for maven projects" 2014-05-02 20:00:42 +00:00
Jenkins
b6d1dd7605 Merge "Fix "delete-all"" 2014-05-02 20:00:36 +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
8b8745586e Merge "Doc: Use VersionInfo from pbr and remove openstack common modules" 2014-05-02 18:19:58 +00:00
Jenkins
8c9586548d Merge "Catch EPIPE exception and return" 2014-05-02 18:10:43 +00:00
Marc Abramowitz
d00e0bbf98 Pass argv to main
This will make it easier to do high-level testing because we'll be able
to call main from tests and pass it arguments

Change-Id: I2bac44a746cd61fda963df622b0a775bf4bf31c2
2014-05-02 10:03:10 -07: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
Jenkins
8df6bab14c Merge "Add additional yaml/xml tests, literalinclude them" 2014-05-01 11:31:18 +00:00
Jenkins
3d6f7e5c71 Merge "Add more tests" 2014-05-01 11:31:12 +00:00
Benjamin Staffin
a8fb3b1483 Tiny spelling fix: YMAL -> YAML
Change-Id: Ic37d764cc7b23759202d47d338af22c0ea25f080
2014-04-30 01:21:25 -07:00
David Pursehouse
ff704931b1 Doc: Use VersionInfo from pbr and remove openstack common modules
The setup was migrated to pbr in d2ff8c0, but the documentation
build is still using VersionInfo from a bundled version of the
openstack common modules.

Migrate the documentation build to use VersionInfo from pbr, and
remove the no-longer-used common modules.

Change-Id: I7dcd5b0328613c7c72efa2df8c26d9c9b1d47c0f
2014-04-30 09:59:39 +09:00