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
Support variable-specific substitutions in templates.

Change-Id: I6af84f48eaa4ee44c8d8babddd8d10a1e1095101
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>
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>
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
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>
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
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
Merge "matrix project: add support for dynamic axis"
Merge "Support variable-specific substitutions in templates."
Adding second failure option to the email-ext module

Change-Id: I288289e8227c3408f40f0e8272573d20e022ae70
Merge "remove misleading jjb example"
Merge "re-arrange docs for clarity"
Fix a broken include in the configuration documentation.

Change-Id: I803caea42365e44851068e510d5e698447aad73b
Merge "Adding second failure option to the email-ext module"
add presend-script to email-ext

Change-Id: I388dd2f5ce8aa6ac323f73409dec1003a3f423cb
refactor cmd processor to make it slightly easier to test

* make logger global
* create methods for setting up of parser and jjb configuration.

Change-Id: Ia8d16e74e8a1097a013512fb624f032b1d085d17
Consistency updates in documentation

Change-Id: I0096348488371c37c0ba645f0bd3d385975ef7d2
Make 'keep_descriptions' fully optional

Avoid the need to set the keep_descriptions option under the job_builder
section if providing any configuration options.

Change-Id: I0436a36e9f5ad7ff68ff5b92868ca1b13d019f11
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