Make reuse of builders/publishers inside other components easier.

Some Jenkins plugins depend on other plugins, and their configuration
section is a mix of both plugins.

For Jenkins Job Builder, that means reusing one component directly from
another one.

Driving the generation of XML markup is the job of Base._dispatch.
Unfortunately, components do not have access to their module object,
and even if their could, _dispatch would still be a non-public method.

Refactor Base._dispatch into ModuleRegistry.dispatch, which can be used
from any place where the parser is available.

Base and ModuleRegistry are extended so that the registry can discover
which entry point must be used for each module, if appropriate.
ModuleRegistry.dispatch signature can be simplified by dropping
component_list_type parameter.

Change-Id: Ie9d090817d0c2d464745b5634a22d3cea6a47ab1
Reviewed-on: https://review.openstack.org/26051
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Add support to the Conditional BuildStep plugin.

This plugin, as its name implies, permits to execute build step conditionaly.

Reusing other builders supported by Jenkins Job Builder is tricky since
when only one step is involved, the markup generated by the sub-builder
must be tweaked.

XML nodes created by sub-builders are added to a dummy node, which makes
their retrieval and tweaking possible. The tweaking consists of
transforming a node <HelloWorld/> into <buildStep class="HelloWorld"/>.

Change-Id: I96bb6af6a9f93e314bc0c531382b87bba7ac9e67
Reviewed-on: https://review.openstack.org/26050
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Add msbuild plugin support.

This is a simple plugin to wrap msbuild tool, which is used
for building .NET projects.

Change-Id: I0803d4477d9132265e559ad40b8c1a981a2cd5ef
Reviewed-on: https://review.openstack.org/27654
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
PublishOver: Expose several options.

Plugins in the Publis Over * series can be configured to:
- fail the build when transfer fail (fail-on-error),
- delete remote directory before tranfering files (clean-remote),
- create a directory using current date (target-is-date-format).

Theses properties are now configurables in Jenkins Job Builders
for the cifs, ftp and ssh variants.

Change-Id: I3808bb577809d4197bfc57f3dc4b2ca8e04ff073
Reviewed-on: https://review.openstack.org/27655
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
matrix jobs: Add slave axis support.

This commit builds on the structure introduced by
Ib2f36e10c1c5fb14f0e4255f35c0bf19c2cc39b3. Slave axis
has the same XML structure than other axes, only the
element name changes.

Change-Id: Ie1d2ef96c7a7d9aa02066ff055ead7c84011bdc6
Reviewed-on: https://review.openstack.org/27656
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Add support for custom gradle version aka gradleName

Change-Id: Ib74bcf852e128a8dfc1a297c5b9dc2571e5666ff
Reviewed-on: https://review.openstack.org/27791
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
email-ext: Expose reply-to and attach-build-log.

Options are self-explanatory hopefully.

Change-Id: I928851ebdaeb75f785d990008792d6a9e72512e3
Reviewed-on: https://review.openstack.org/27965
Reviewed-by: Jesse Keating <jesse.keating@rackspace.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Add support for the promoted builds plugin.

Change-Id: I393f1c4d47253fbe53f774c5e60cd20f65b5348e
Reviewed-on: https://review.openstack.org/28005
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
add support for building with grails

Change-Id: Ie5caf99bdbe6f6f5493511d2710ee04747fb0494
Reviewed-on: https://review.openstack.org/28125
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
maven-target: Expose maven version and pom location.

These parameters are configurable in Jenkins, and should
be in Jenkins Job Builder too.

Change-Id: Ia6ac92cf687ef36a99140c65dfd4bc7f7162ecf8
Reviewed-on: https://review.openstack.org/27964
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Adding merge before build to git

This change adds the ability to merge to a specific repoistory and
branch based on the values entered.  The intent was to make the new
parameters 'remote' and 'branch' only be used if 'merge' is specified

Change-Id: Iab9db6d4ca6ff608bf946b9a38cc0756d6a78b86
Reviewed-on: https://review.openstack.org/28148
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins