Change gerritbot to install from git
Previously gerritbot installed from a release version. So any change to gerritbot requires a new release of gerritbot before it can come into effect. Change it to install the current git master branch for gerritbot and use that. Change-Id: Id229306960a9aa6ccf6241662e7172fce8150d33
This commit is contained in:
parent
4e969c5808
commit
d434fd93d0
@ -9,21 +9,38 @@ class gerritbot(
|
||||
$ssh_rsa_key_contents = undef,
|
||||
$ssh_rsa_pubkey_contents = undef,
|
||||
$vhost_name = $::fqdn,
|
||||
# Where to fetch the git repository from
|
||||
$git_source_repo = 'https://git.openstack.org/openstack-infra/gerritbot',
|
||||
# Destination directory for the git repository
|
||||
$git_root_dir = '/opt/gerritbot',
|
||||
# The git branch
|
||||
$git_revision_branch = 'master',
|
||||
) {
|
||||
include ::pip
|
||||
|
||||
package { 'gerritbot':
|
||||
# Clone the git repository
|
||||
vcsrepo { $git_root_dir:
|
||||
ensure => latest,
|
||||
provider => openstack_pip,
|
||||
provider => git,
|
||||
revision => $git_revision_branch,
|
||||
source => $git_source_repo,
|
||||
require => Class['pip'],
|
||||
}
|
||||
|
||||
# Install gerritbot using pip
|
||||
exec { 'install-gerritbot' :
|
||||
command => "pip install -U -r${git_root_dir}/requirements.txt && pip install --no-deps -U ${git_root_dir}",
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
refreshonly => true,
|
||||
subscribe => Vcsrepo[$git_root_dir],
|
||||
}
|
||||
|
||||
file { '/etc/init.d/gerritbot':
|
||||
ensure => present,
|
||||
group => 'root',
|
||||
mode => '0555',
|
||||
owner => 'root',
|
||||
require => Package['gerritbot'],
|
||||
require => Exec['install-gerritbot'],
|
||||
source => 'puppet:///modules/gerritbot/gerritbot.init',
|
||||
}
|
||||
|
||||
@ -33,7 +50,7 @@ class gerritbot(
|
||||
hasrestart => true,
|
||||
require => File['/etc/init.d/gerritbot'],
|
||||
subscribe => [
|
||||
Package['gerritbot'],
|
||||
Exec['install-gerritbot'],
|
||||
File['/etc/gerritbot/gerritbot.config'],
|
||||
File['/etc/gerritbot/channel_config.yaml'],
|
||||
],
|
||||
|
@ -8,5 +8,6 @@
|
||||
"project_page": "http://docs.openstack.org/infra/system-config/",
|
||||
"issues_url": "https://storyboard.openstack.org/#!/project/717",
|
||||
"dependencies": [
|
||||
{"name":"openstackinfra/vcsrepo","version_requirement":">= 0.0.8"}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user