Merge "Add ability to change the slave gerrit user"
This commit is contained in:
commit
fb9c593f48
@ -1,3 +0,0 @@
|
||||
[user]
|
||||
name = OpenStack Jenkins
|
||||
email = jenkins@openstack.org
|
@ -3,6 +3,9 @@
|
||||
class jenkins::jenkinsuser(
|
||||
$ssh_key = '',
|
||||
$ensure = present,
|
||||
$gitfullname = 'OpenStack Jenkins',
|
||||
$gitemail = 'jenkins@openstack.org',
|
||||
$gerrituser = 'jenkins',
|
||||
) {
|
||||
|
||||
group { 'jenkins':
|
||||
@ -40,7 +43,7 @@ class jenkins::jenkinsuser(
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0640',
|
||||
source => 'puppet:///modules/jenkins/gitconfig',
|
||||
content => template('jenkins/gitconfig.erb'),
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,9 @@ class jenkins::slave(
|
||||
$ssh_key = '',
|
||||
$user = true,
|
||||
$python3 = false,
|
||||
$gitfullname = 'OpenStack Jenkins',
|
||||
$gitemail = 'jenkins@openstack.org',
|
||||
$gerrituser = 'jenkins',
|
||||
) {
|
||||
|
||||
include pip
|
||||
@ -11,8 +14,11 @@ class jenkins::slave(
|
||||
|
||||
if ($user == true) {
|
||||
class { 'jenkins::jenkinsuser':
|
||||
ensure => present,
|
||||
ssh_key => $ssh_key,
|
||||
ensure => present,
|
||||
ssh_key => $ssh_key,
|
||||
gitfullname => $gitfullname,
|
||||
gitemail => $gitemail,
|
||||
gerrituser => $gerrituser,
|
||||
}
|
||||
}
|
||||
|
||||
|
6
modules/jenkins/templates/gitconfig.erb
Normal file
6
modules/jenkins/templates/gitconfig.erb
Normal file
@ -0,0 +1,6 @@
|
||||
[user]
|
||||
name = <%= scope.lookupvar('jenkins::jenkinsuser::gitfullname') %>
|
||||
email = <%= scope.lookupvar('jenkins::jenkinsuser::gitemail') %>
|
||||
[gitreview]
|
||||
rebase = false
|
||||
username = <%= scope.lookupvar('jenkins::jenkinsuser::gerrituser') %>
|
Loading…
Reference in New Issue
Block a user