Raise exceptions when no entrypoint, macro or template found

When generating XML and no component is found for the given yaml entry
whether it is a JJB module, macro or job template, raise an exception
instead of silently continuing by not generating XML and requiring the
user to check the results.

Change-Id: Icd4b1fae123c8bbb4d8af7aa14522251cd9cf8d5
Add CodeReview vote ability to the Gerrit trigger

- Made all four of the
  gerrit-build-(successful|failure)-(verified|codereview)-value
  parameters optional, so you can override only the ones you want.

- Also allows for vote values like '+1' in the yaml by first coercing
  to int and then str.

Change-Id: Id2ad7e4a4cf53bd33b3aca80fd95ed1d4b3ff266
New base class to declare test cases and tests to the node option

This patch refactors the tests suite to use a base class to declare test cases
just using a class declaration, the existing test class was modified to use it
and new tests are using it as well.

These tests verify the XML generated when the 'node' option is set and
when it's absent.

Change-Id: Iddcdd63e0ab7c459f6513b1d1ebf19e19a362c1d
Added support for Git shallow clone parameter

Change-Id: Ia0251f25ff22fff10fe53ba6bf54f0e9072210fd
Deprecate projectName setting of CopyArtifact

Starting with version 1.26 of the CopyArtifact plugin all Jenkins job
configurations using this plugin get rewritten on the fly if you run at
least one build. This causes serious failures of the CopyArtifact
feature as soon as the project name includes axis selections.

If the config.xml of a job includes identical project *and* projectName
settings (this is what happens with JJB without this patch), like:

    <project>demojob/axis=$setting</project>
    <projectName>demojob/axis=$setting</projectName>

then it fails to run with current version(s) of the Copy Artifacts
plugin.

The problem is that while the web interface displays the correct
configuration for a fresh job created with JJB (Project Name:
"demojob/axis=$setting" and "Parameter filters" being empty), the
*wrong* configuration is actually used (Project Name: "demojob" and
"Parameter filters: "axis=$setting"). The reason is that when you
execute the job for the first time (after the config.xml was created by
JBB) the Copy Artifacts plugin automatically converts the configuration
to:

    <project>jenkins-debian-glue-binaries</project>
    <parameters>axis=$setting</parameters>

which is something different than wanted and it doesn't work.
This settings stays permanent then until you *manually* fix it.

When you manually select "Configure" on the original job (the one with
project + projectName settings being identical as noted above) in the
web interface without running it first and then click on "Save" it's
fine though, looking like:

    <project>demojob/axis=$setting</project>

Since people usually use current versions of Jenkins plugins (and
version 1.26 of the CopyArtifact plugin was released in March
2013, being ~8 months as of today) and because the python-jenkins
library doesn't offer the ability to query for plugin version
info it's better to just use current defaults instead of breaking
configurations in a quite hard-to-debug way. This also reflects
upstream's opinion about the required change, quoting Jesse Glick
from the Jenkins bug tracker:

| The projectName field is deprecated, and may not be used together
| with project; there is a one-way conversion of projectName (which
| gets deleted) to project plus parameters. If jenkins-job-builder
| writes out a configuration including both fields then it is
| simply buggy.

Change-Id: Ie93316b135dc2b4547922062c7393ea7e5cc4e4c
Updated gitblit projectname

Change-Id: I373841676bc48c8531761af5fcc5192913262552
Merge "Add CodeReview vote ability to the Gerrit trigger"
Merge "New base class to declare test cases and tests to the node option"
Merge "Added support for Git shallow clone parameter"
Merge "Updated gitblit projectname"
Provide default ConfigParser object

Replace config dictionary with proper ConfigParser object
to avoid NoSectionError for required options.

Change-Id: Ib1a506641d4bab05e34f80114803bfedf4aa89b7
Fix string continuation exception

Python does not concatenate strings before performing
substitutions. Make sure that python sees the error message
as a single string.

Change-Id: Ib0561f93c76239b93000885250b3fa15ccaeb937
fix jjb scp publisher example

The scp publisher is incorrect.  It was missing a 'files' list.

Change-Id: I45d4708d0aee53adc7a7f16334dc7538757d22d4
use jjb tests as the examples

So during my reviews of jjb code I've noticed that many of the examples in
the documentation are either not correct or are out of date.  So instead of
documenting examples in the source I think it would be preferable to
have a test for every module and use that test as the example for the
module.  We run the tests continuously so this will keep the examples
working and up to date.

This patch starts with the scp module.

Change-Id: I161fa22359f8ecb2ae9e511d204c1fa0bce48581
Added support for Emotional Jenkins

Change-Id: Icaac9cc07b64384b3d65234bf9c603ef55f0b104
Merge "Added support for Emotional Jenkins"
fix jjb configuration documentation

fixed incorrect yaml indentation in the project template and macro section

Change-Id: I9f284dcc39c9c428595c10f4c1bc5e97081392c3
Added support for Stash Notifier

Change-Id: I1e3e95a152de116df62b9124a50e845bc026f608
Ensure jobparams and group_jobparams are dict

When defining a list of jobs in a project, if a colon is added after
the job name but no parameters is provided, jobparams is None.

As dict.update() expects parameter to be iterable, ensure jobparams
and group_jobparams are always a dict to prevent JJB from crashing.

Change-Id: Ie57aa9e5b446fe502dff896cde773ddcc92ba803
Closes-bug: #1253180
Merge "Provide default ConfigParser object"