fix downstream bug
Remove @build_date and make it a @build variable

@build_date was a temporary workaround until we established a true instance
variable for the @build object. This commit replaces @build_date with
@build.build_date wherever we use it. This will also be important because we'll
use it when we trigger the dynamically created jobs with jenkins.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Remove temporary staging artifacts
Add a fail_on_dirty_source utility method

We'll use this in both jenkins.rake and jenkins_dynamic.rake.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Pull library requirement out into a utility method

We require and fail with a message all over the place, so let's abstract into a
utility method.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Add job triggering to jenkins_dynamic.rake

Previously, jenkins dynamic could create the jobs, but not trigger them. This
commit updates the dynamic job creation to also trigger the execution of the
job first job after it has been created. Unfortunately, this uses a lot of the
same logic that jenkins.rake does. Ideally we would be able to get rid of all
of this duplication, and we will. Just not right now.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Update packaging.xml.erb to quote the workspace/params file path

And always build unless we failed
Job creation order may actually be important. Oh jenkins..

Also remove an extra newline in the tmeplate
add and modify erb files for dynamic jenkins jobs

This commit fixes various bugs and issues with the erb templates for
packaging and repo. Mainly spelling errors or mislabeled variables.
Pass REF in as well
Build duration set to one day, ascii art added

To help keep Jenkins cleaner, builds will exist for only a day on
jenkins. Additionally, there is some important data in the console
output that isn't easily found. This commit adds some ascii art to help
make that information more prominant

Conflicts:
	templates/repo.xml.erb
Update days to keep to 3

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Remove old uber_build and replace with new uber_build_dynamic

This commit removes the existing pl:jenkins:uber_build task and updates it with
the new dynamic task. The new uber_build will be the preferred way to kick off
all the builds.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Update README.md for new jenkins uber_build workflow
Update formatting on build url callout

Make sure the callouts on the build job url information are all left-justified

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Update repo creation template to use git bundle from upstream

Previously, the repo creation project would attempt to just clone the master
branch of the puppetlabs repo of the project being built by the upstream
packaging job, and checkout the git ref that was packaged. The downside of this
is that it assumes the ref exists in the puppetlabs repo, which won't be the
case if one is packaging code that isn't checked in. This commit updates the
repo creation job to use the copy artifacts plugin, which copies the git bundle
that has been archived by the package:tar configuration of the packaging matrix
job (which will always be run, and should be a build failure if it fails). By
using the git bundle, we're again back in the world where refs don't have to be
in github/puppetlabs and we're also relying on the same code checkout as the
user.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>

Conflicts:
	templates/repo.xml.erb

Conflicts:
	templates/repo.xml.erb
Update packaging template to archive git bundle

Previously we would pass the git ref of the artifact "under package" to the
downstream repo creation job. The repo creation job would attempt to check it
out from the puppetlabs/$project repo, and then create repos. This doesn't work
if the ref isn't in github/puppetlabs, e.g. if one is packaging a local commit
or one in a different fork. This commit updates the packaging job to archive
the git bundle as a build artifact and forgo the REF parameter. This allows
the downstream repo creation job to pull in the git bundle via the copy
artifacts plugin, and then clone it and perform the repo creation. This
ensures the packaging repo maintains its paradigm of being able to build
artifacts that aren't necessarily checked into the the trunk. This commit also
updates the packaging job trigger to avoid passing REF in as an argument, which
no longer exists.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Update build timeout to 45 minutes from 30

Dashboard can actually take longer than 30 minutes to build, so with this
commit we bump the timeout to 45 to avoid any sort of false failure.
Enable notifications for new dynamic uber_build workflow

This commit adds another build parameter, notify, which is populated via yaml
or via the NOTIFY= environment variable. This be used to set up the dynamic
jenkins task with a notification event for the status of the job. Usage:

rake pl:jenkins:uber_build NOTIFY=moses@puppetlabs.com

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Don't delete workspace if we don't have to