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(
|
class jenkins::jenkinsuser(
|
||||||
$ssh_key = '',
|
$ssh_key = '',
|
||||||
$ensure = present,
|
$ensure = present,
|
||||||
|
$gitfullname = 'OpenStack Jenkins',
|
||||||
|
$gitemail = 'jenkins@openstack.org',
|
||||||
|
$gerrituser = 'jenkins',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
group { 'jenkins':
|
group { 'jenkins':
|
||||||
@ -40,7 +43,7 @@ class jenkins::jenkinsuser(
|
|||||||
owner => 'jenkins',
|
owner => 'jenkins',
|
||||||
group => 'jenkins',
|
group => 'jenkins',
|
||||||
mode => '0640',
|
mode => '0640',
|
||||||
source => 'puppet:///modules/jenkins/gitconfig',
|
content => template('jenkins/gitconfig.erb'),
|
||||||
require => File['/home/jenkins'],
|
require => File['/home/jenkins'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@ class jenkins::slave(
|
|||||||
$ssh_key = '',
|
$ssh_key = '',
|
||||||
$user = true,
|
$user = true,
|
||||||
$python3 = false,
|
$python3 = false,
|
||||||
|
$gitfullname = 'OpenStack Jenkins',
|
||||||
|
$gitemail = 'jenkins@openstack.org',
|
||||||
|
$gerrituser = 'jenkins',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include pip
|
include pip
|
||||||
@ -13,6 +16,9 @@ class jenkins::slave(
|
|||||||
class { 'jenkins::jenkinsuser':
|
class { 'jenkins::jenkinsuser':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
ssh_key => $ssh_key,
|
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