Check tox runs for sudo attempts.

If Jenkins has attempted to sudo during a tox run, fail the
test.

Also, remove "-e" from run-tox, so that pip freeze always runs.

Change-Id: I98230e4de03667f15f119fac45e1eba0ac249c1c
Reviewed-on: https://review.openstack.org/12458
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Set jenkins job default logrotate to 1 day.

Remove timeout and logrotate sections, except where overriding
defaults.

Change-Id: If65952da0bb59319e9c413349a95b4e7b39eece2
Reviewed-on: https://review.openstack.org/12516
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Pass sysadmins list into node defs.

Pass the sysadmins list into each node definition. This allows us to
retrieve the data from hiera rather than hard coding it in the puppet
manifests. Also, update test script to use bogus sysadmin data when
testing.

Change-Id: Ide3560f16bce4d66fb95cc5021fc879476e6a712
Reviewed-on: https://review.openstack.org/12512
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Gerrit Trivial Rebase Detection

Adds trivial_rebase.py for bug 881184.

* modules/openstack_project/files/gerrit/scripts/trivial_rebase.py: A
modified version of the contrib/trivial_rebase.py included in upstream
Gerrit's git tree (we'll try to get individual patches submitted
upstream soon):

    git clone https://gerrit.googlesource.com/gerrit

* modules/openstack_project/files/gerrit/patchset-created: Moved to
modules/openstack_project/templates/gerrit_patchset-created.erb and
added an entry for the trivial_rebase.py script with variables for its
command-line options sourced from gerrit.pp and review{,_dev}.pp.

* modules/openstack_project/manifests/gerrit.pp: Changed the file
definition for /home/gerrit2/review_site/hooks/patchset-created to use a
template, adding the ssh_host_key and trivial_rebase_role_id variables
it requires. Added a file entry for trivial_rebase.py as well, since
we're putting it in modules/openstack_project instead of modules/gerrit
where the existing scripts reside (we'll eventually want to move all of
modules/gerrit/files/scripts out of there at some point, but not now).

* modules/openstack_project/manifests/review_dev.pp: Override the
trivial_rebase_role_id variable to trivial-rebase@review-dev.o.o on
review-dev.

* modules/openstack_project/manifests/review.pp: Override the
trivial_rebase_role_id variable to trivial-rebase@review.o.o on review.

Change-Id: I941f15525c72b84708ae1de6832834eb53ab6863
Reviewed-on: https://review.openstack.org/12373
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Update docs with new steps to add projects.

The process to add new projects to gerrit has changed since the docs
were originaly written and they need an update. Add steps for zuul, use
review.o.o instead of gerrit.o.o, and don't set shared=group when
running `git init` for the local git replicas.

Change-Id: Ief34dd4afce2fcc5884b1a0aca361b7105fc3790
Reviewed-on: https://review.openstack.org/12386
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Add volume-api project.

Add volume-api project. Close git pull requests and configure zuul to
build this project using netconn-api-20 as the example config.

Change-Id: I9d8e48120e25d6a28c51c0fcfba1c422560cff00
Reviewed-on: https://review.openstack.org/12387
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Make jenkins_ssh_key visible to static.pp.

openstack_project/static.pp needs to include openstack_project in order
to use openstack_project::jenkins_ssh_key. Make it so.

Change-Id: I4abe98492e32307aa1ba18c1efa485e8b5181b2e
Reviewed-on: https://review.openstack.org/12722
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Pass hiera sysadmin data to proper class.

The jenkins node includes the jenkins class and zuul class. Hiera
sysadmin data should be passed to the jenkins class and not the zuul
class. Move the argument to the jenkins class.

Change-Id: I0510446991749345d461c59083055a7750aede79
Reviewed-on: https://review.openstack.org/12723
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins