James E. Blair b5ef357f7d Add some missing zuul bits.
Change-Id: I736c3eab317bf68bc295ece81e88933f005e26e4
2012-05-30 08:33:55 -07:00

32 lines
695 B
Puppet

class zuul ()
{
# if we already have the repo the pull updates
exec { "update_zuul":
command => "git pull --ff-only",
cwd => "/opt/zuul",
path => "/bin:/usr/bin",
onlyif => "test -d /opt/zuul",
before => Exec["get_zuul"],
}
# otherwise get a new clone of it
exec { "get_zuul":
command => "git clone https://github.com/openstack-ci/zuul /opt/zuul",
path => "/bin:/usr/bin",
onlyif => "test ! -d /opt/zuul"
}
exec { "install_zuul":
command => "python setup.py install",
cwd => "/opt/zuul",
path => "/bin:/usr/bin",
subscribe => [ Exec["get_zuul"], Exec["update_zuul"] ],
}
file { "/etc/zuul":
ensure => "directory",
}
}