Prepopulate log server for single-node-ci

Automatically create the jenkins SCP repository host
for jenkins job log files.  Otherwise it needs to be setup
manually.

Change-Id: I54ecccc3d3d9e668d989ec52a822fc194722e619
This commit is contained in:
Ramy Asselin 2015-11-07 21:02:47 -08:00
parent d2a958c86f
commit 5e0fdb6c92
3 changed files with 26 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class openstackci::jenkins_master (
$jjb_git_revision = 'master',
$project_config_repo = '',
$project_config_base = '',
$log_server = undef,
) {
class { '::jenkins::master':
@ -115,4 +116,14 @@ class openstackci::jenkins_master (
require => $::project_config::config_dir,
}
}
if $log_server != undef {
file {'/var/lib/jenkins/be.certipost.hudson.plugin.SCPRepositoryPublisher.xml':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0644',
content => template('openstackci/be.certipost.hudson.plugin.SCPRepositoryPublisher.xml.erb'),
}
}
}

View File

@ -186,6 +186,7 @@ class openstackci::single_node_ci (
jenkins_username => $jenkins_username,
jenkins_password => $jenkins_password,
project_config_repo => $project_config_repo,
log_server => $log_server,
}
class { '::openstackci::zuul_merger':

View File

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<be.certipost.hudson.plugin.SCPRepositoryPublisher_-DescriptorImpl plugin="scp@1.9-SNAPSHOT">
<sites>
<be.certipost.hudson.plugin.SCPSite>
<displayname>LogServer</displayname>
<hostname><%= @log_server %></hostname>
<port>22</port>
<username>jenkins</username>
<password></password>
<keyfile>/var/lib/jenkins/.ssh/id_rsa</keyfile>
<rootRepositoryPath>/srv/static</rootRepositoryPath>
</be.certipost.hudson.plugin.SCPSite>
</sites>
</be.certipost.hudson.plugin.SCPRepositoryPublisher_-DescriptorImpl>