Update zuul-env on job nodes

Improve the zuul-env handling in openstack_project::slave_common to
rely on a Vcsrepo source and update whenever it changes. This allows
us to increase the version of Zuul installed in the virtualenv over
time on persistent job nodes.

Change-Id: If07b31f3a735cf7bcf6bfb8591ed37577f5ae201
This commit is contained in:
Jeremy Stanley 2016-08-23 17:19:52 +00:00
parent 58b4e4cdce
commit a4d235ea00
2 changed files with 12 additions and 9 deletions

View File

@ -1 +0,0 @@
-e git+https://git.openstack.org/openstack-infra/zuul#egg=zuul

View File

@ -144,20 +144,24 @@ class openstack_project::slave_common(
}
}
file { '/etc/zuul-env-reqs.txt':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/zuul-env-reqs.txt',
vcsrepo { '/opt/zuul':
ensure => latest,
provider => git,
revision => 'master',
source => 'https://git.openstack.org/openstack-infra/zuul.git',
}
python::virtualenv { '/usr/zuul-env':
ensure => present,
requirements => '/etc/zuul-env-reqs.txt',
owner => 'root',
group => 'root',
timeout => 0,
require => File['/etc/zuul-env-reqs.txt'],
}
exec { 'zuul-env-update':
command => '/usr/zuul-env/bin/pip --log /usr/zuul-env/pip.log install /opt/zuul',
refreshonly => true,
subscribe => Vcsrepo['/opt/zuul'],
require => Python::Virtualenv['/usr/zuul-env'],
}
}