Add Jenkins SSH key to proposal.slave.

Proposal.slave.openstack.org is used to push change proposals into
Gerrit. To do this the slave needs to have the Jenkins' private SSH key
installed. Make it so.

Change-Id: Id3106d3167da0569370000e3c1a724a88abbd245
This commit is contained in:
Clark Boylan 2013-08-05 10:38:59 -07:00
parent 7e5901a397
commit 48b235fe27
2 changed files with 13 additions and 3 deletions

View File

@ -434,9 +434,10 @@ node 'devstack-launch02.slave.openstack.org' {
node 'proposal.slave.openstack.org' { node 'proposal.slave.openstack.org' {
include openstack_project include openstack_project
class { 'openstack_project::proposal_slave': class { 'openstack_project::proposal_slave':
transifex_username => 'openstackjenkins', transifex_username => 'openstackjenkins',
transifex_password => hiera('transifex_password'), transifex_password => hiera('transifex_password'),
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key, jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
} }
} }

View File

@ -5,6 +5,7 @@
# #
class openstack_project::proposal_slave ( class openstack_project::proposal_slave (
$jenkins_ssh_public_key, $jenkins_ssh_public_key,
$jenkins_ssh_private_key,
$transifex_password = '', $transifex_password = '',
$transifex_username = 'openstackci', $transifex_username = 'openstackci',
) { ) {
@ -27,4 +28,12 @@ class openstack_project::proposal_slave (
content => template('openstack_project/transifexrc.erb'), content => template('openstack_project/transifexrc.erb'),
require => User['jenkins'], require => User['jenkins'],
} }
file { '/home/jenkins/.ssh/id_rsa':
owner => 'jenkins',
group => 'jenkins',
mode => '0400',
require => File['/home/jenkins/.ssh'],
content => $jenkins_ssh_private_key,
}
} }