publishers: added option to define groovy postbuild script

Change-Id: I3ee3be40148321412c04bfa2c72152bc41986389
Reviewed-on: https://review.openstack.org/20905
Reviewed-by: Jaroslav Henner <jhenner@redhat.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Implement publisher.checkstyle

Add publisher for Checkstyle Plugin[1] (based on code for the
Violations Plugin publisher)

[1] https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin

Change-Id: Ie622ad8600720081072f288e72dd56e65505380a
Reviewed-on: https://review.openstack.org/21066
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Gitignore: Add /etc/jenkins_jobs.ini and output/ directory.

Change-Id: I358b0a05a2a1a9936f30eef3e77b555eff1044ec
Reviewed-on: https://review.openstack.org/21908
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Adding extended-choice functionality

This change adds the ability to use the extended choice plugin.
This plugin allows you to populate a file with choices and then
allow the user to select one or more when the build now button
is clicked.  This change only changes the properties and setup
files.

Change-Id: I05af63f75f9ab87cd923c23177d33898c26149cf
Reviewed-on: https://review.openstack.org/20610
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Fixing trigger-parameterized-builds example

The example for the trigger-parameterized-builds functionality is
incorrect.  A dash is needed before the project in the yaml so the
code knows that project is used multiple times.  I also added the
predefined-parameters value to the example to show how that is used,
 because it took me a while to figure out

Change-Id: Ib6c5ffb18c213ccc1396edd1264edbf4c28ff651
Reviewed-on: https://review.openstack.org/21129
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Copy Artifact Plugin now specifies which build

The Copy Artifact Plugin has been extended to allow you to specify
which build to get.  There has been a dictionary created to
validate the value passed is correct and another dictionary
has been created to validate the permalink passed, if that option
is selected.  There are also parameters added for several of the
ways to select a build.

Change-Id: I71bbdcaada184736cc30e6390751aff1a864f9d5
Reviewed-on: https://review.openstack.org/21150
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Fixing svn-tags to work correctly

It was discovered that when using svn-tags functionality that when
you go to build the list is not populated.  If you just saved the job
in Jenkins then it would work correctly.  It was determined that the
<uuid> tag was missing and this was needed for the parameter to work.
In testing it was found that simply putting <uuid>1-1-1-1-1</uuid> into
the config would make the svn-tags functionality work like expected.
This is a one line change to add the uuid element set to 1-1-1-1-1

Change-Id: Iea1c27ebc9aa7c17f4f390c375989240c1941ce0
Reviewed-on: https://review.openstack.org/21809
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Add support for passing git revision through a parameterized build trigger.

Change-Id: Id937a278b04f2a590e9b1606b18634f584032bb8
Reviewed-on: https://review.openstack.org/22555
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Add support to copyartifact builder for flattening dirs

Change-Id: I72278b220dcd61dd323da91c8cbd0282b8d0f97c
Reviewed-on: https://review.openstack.org/22556
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Kiall Mac Innes <kiall@hp.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Stop referring to openstack/openstack-ci-puppet.

The openstack/openstack-ci-puppet repo moved and became
openstack-infra/config. Remove references to openstack-ci-puppet and
replace them with references to openstack-infra/config.

Change-Id: I75e7797995b894b6053901dbcfa351404048ea7c
Reviewed-on: https://review.openstack.org/23227
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Adding ability to specify Java Options to Ant

You can now specify the Java Options to pass to ant.  The leading dash is
needed and multiples are specified like:
   java-opts:
      - "-ea"
      - "-Xmx512m"
I only changed the builders.py file and I followed the properties section
above my change as a template.

Change-Id: Ifa3d06a53b160444224f308d36e7b2bd903591bd
Reviewed-on: https://review.openstack.org/23097
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
Property file for parameterized downstream jobs

Added ability to specify parameters from properties file for parameterized
build on other projects.  This change follows the predefined-properties code
as a template for how to do the work.  This is a change to only the
publishers.py file.

Change-Id: I4b3500dc9b4f50450475aa8441854fa6b5b0ccb0
Reviewed-on: https://review.openstack.org/23432
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
Build when a change is pushed to GitHub

Added ability to build when a change is pushed to github, to the triggers.
This change is changing the triggers.py file and follows the poll scm
as a template for the change.  Setup.py was also changed to enable the new
feautre.  There is outside changes needed to Jenkins and/or github to fully
use this feature.  You need to tell Jenkins whether to automatically manage
the github repos or you need to put the correct URL into the webhook.
Furthermore, at the current time it is necessary to set both github and
pollscm for this to work.  In the future this may not be necessary so setting
github does not automatically set pollscm.

Change-Id: Id7b48fa47f63669ba31282a403f07a1234e7ac31
Reviewed-on: https://review.openstack.org/23433
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
publishers: Add support for Publish over CIFS.

Projects might need to publish artifacts on Windows shares, which is
possible with the CIFS variant of Publish Over plugins.

The provided support is mostly similar to the existing ftp support.

Change-Id: Ic313f579158fb6460ab934f705b9c512b1131ca2
Reviewed-on: https://review.openstack.org/23861
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
cifs: Externalize common code to base_publish_over.

The various Publish Over... plugins offer a similar configuration
structure.

Externalizing that knowledge will allow reuse between modules.

Change-Id: I8dd7f62713da013354c656e9437522210e2c39f9
Reviewed-on: https://review.openstack.org/23862
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
ftp: Refactor using base_publish_over.

The subtlety is that Publish Over FTP offers additional options compared
to the CIFS variant. This is done by customizing the XML tree created by
base_publish_over.

Change-Id: I5ff3614781cb52a47bf9816c2326d3fe9a96a47f
Reviewed-on: https://review.openstack.org/23863
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
ftp, cifs: Make optional prefixes really optionals.

Excludes and remove were marker optional, but weren't in practice.
Provides defaults values so that they are really optional.

Change-Id: I6bd6f5183d888b0716bdf5690fc19bcd91bfc856
Reviewed-on: https://review.openstack.org/23864
Reviewed-by: Monty Taylor <mordred@inaugust.com>
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
Document current-params option for trigger-build

There was some documentation missing, so I had to find this option when I was
trying to add it myself, in the source code. Nasty!

Added documentation so nobody else has to do that.

Change-Id: I9b6a0227479b600fed213d926f5cd22981db612e
Reviewed-on: https://review.openstack.org/23963
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Fix checkstyle documentation

This is following the style of the artifact-resolver builder, which
has other nested dictionaries also.

Change-Id: I26b909e18239df03c123e07791fa7a3549be7701
Reviewed-on: https://review.openstack.org/23977
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Add multi-SCM capabilities

Jenkins has a multiple-SCM option. We can just support that by using it when
more than one SCM module is defined. Simple enough.

Change-Id: Iacfba5c547ff111304644a4777a12a70b0b22e62
Reviewed-on: https://review.openstack.org/23961
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins