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
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
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>
The same job definition and examples were in both general.rst and
configuration.rst. Moved the contents of general to configuration.
Change-Id: Iefdf1b6ac3b9679a8af4451710442bf58054d790
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>
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>
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
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
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
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
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
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
- 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
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
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
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
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