Support variable-specific substitutions in templates.

Change-Id: I6af84f48eaa4ee44c8d8babddd8d10a1e1095101
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
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
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>
Merge "update URL references to project."
Merge "authorization property: add extended read support"
Merge "reference tests as examples"
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>
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"
Merge "Adding second failure option to the email-ext module"
Added parallelization options

* Only update_jobs uses the parallel features right now
* --threads N
    - if set to 0, it will use parallel execution and
      use the number of cores in the machine as thread count
    - Any other value enables the paralllel extensions and sets the
      number of concurrent threads to that value
    - Will use 1 by default

Added some tests to make sure the parallel execution helpers work as
expected

Change-Id: Iee8426ff2dc4c5b4ebec4c15bdd21cae5b47eb83
Signed-off-by: David Caro <dcaroest@redhat.com>
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
Added possibility to use non-existent keys

When including a file, it failed if any of the keys inside it did not exist, now
it will replace the non-existing keys with '' instead, allowing the usage os
non-existing keys.

Change-Id: Iad9f0e522725e6fd6681cd62d3e36f69baf09585
Signed-off-by: David Caro <dcaroest@redhat.com>