2012-11-19 17:10:35 -08:00
|
|
|
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
2015-07-03 18:03:20 +00:00
|
|
|
# Class to install dependencies for uploading releases to pypi, maven and
|
|
|
|
# similar external repositories
|
2012-11-19 17:10:35 -08:00
|
|
|
#
|
2015-07-03 18:03:20 +00:00
|
|
|
class openstack_project::release_slave (
|
2012-12-27 16:58:03 -08:00
|
|
|
$pypi_password,
|
2013-06-01 19:40:07 -07:00
|
|
|
$jenkins_ssh_public_key,
|
2013-06-12 14:26:41 -07:00
|
|
|
$pypi_username = 'openstackci',
|
|
|
|
$jenkinsci_username,
|
2014-03-23 07:48:27 -07:00
|
|
|
$jenkinsci_password,
|
|
|
|
$mavencentral_username,
|
2014-11-16 19:32:44 +00:00
|
|
|
$mavencentral_password,
|
|
|
|
$puppet_forge_username,
|
|
|
|
$puppet_forge_password,
|
2015-03-05 13:28:05 +01:00
|
|
|
$jenkins_gitfullname = 'OpenStack Jenkins',
|
|
|
|
$jenkins_gitemail = 'jenkins@openstack.org',
|
2015-06-29 10:20:39 -04:00
|
|
|
$project_config_repo = 'https://git.openstack.org/openstack-infra/project-config',
|
2015-07-02 15:43:32 -07:00
|
|
|
$npm_username,
|
|
|
|
$npm_userpassword,
|
|
|
|
$npm_userurl,
|
2016-01-28 05:33:36 -08:00
|
|
|
$admin_keytab = '',
|
2012-11-16 13:16:26 -08:00
|
|
|
) {
|
2013-06-01 19:40:07 -07:00
|
|
|
class { 'openstack_project::slave':
|
2015-03-05 13:28:05 +01:00
|
|
|
ssh_key => $jenkins_ssh_public_key,
|
|
|
|
jenkins_gitfullname => $jenkins_gitfullname,
|
|
|
|
jenkins_gitemail => $jenkins_gitemail,
|
2015-06-29 10:20:39 -04:00
|
|
|
project_config_repo => $project_config_repo,
|
2016-01-28 05:33:36 -08:00
|
|
|
afs => true,
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/afsadmin.keytab':
|
2016-02-04 22:40:20 -08:00
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
2016-01-28 05:33:36 -08:00
|
|
|
mode => '0400',
|
|
|
|
content => $admin_keytab,
|
2013-06-01 19:40:07 -07:00
|
|
|
}
|
|
|
|
|
2013-09-26 10:53:31 -07:00
|
|
|
package { 'twine':
|
2015-12-16 15:58:40 -08:00
|
|
|
ensure => present,
|
2014-06-06 14:00:53 +00:00
|
|
|
}
|
|
|
|
|
2015-12-16 16:04:46 -08:00
|
|
|
package { 'python-wheel':
|
|
|
|
ensure => present
|
2012-11-19 17:10:35 -08:00
|
|
|
}
|
2012-11-16 13:16:26 -08:00
|
|
|
|
2015-09-30 04:51:08 -07:00
|
|
|
class { '::nodejs':
|
|
|
|
repo_url_suffix => 'node_0.12',
|
2015-09-21 13:18:22 -07:00
|
|
|
}
|
|
|
|
|
2015-09-30 04:51:08 -07:00
|
|
|
file { '/home/jenkins/.npmrc':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0600',
|
|
|
|
content => template('openstack_project/npmrc.erb'),
|
|
|
|
require => File['/home/jenkins'],
|
2015-07-02 15:43:32 -07:00
|
|
|
}
|
|
|
|
|
2013-09-26 10:53:31 -07:00
|
|
|
file { '/home/jenkins/.pypirc':
|
2012-11-16 13:16:26 -08:00
|
|
|
ensure => present,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0600',
|
2013-09-26 10:53:31 -07:00
|
|
|
content => template('openstack_project/pypirc.erb'),
|
2012-11-16 13:16:26 -08:00
|
|
|
require => File['/home/jenkins'],
|
|
|
|
}
|
2013-06-12 14:26:41 -07:00
|
|
|
|
|
|
|
file { '/home/jenkins/.jenkinsci-curl':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0600',
|
|
|
|
content => template('openstack_project/jenkinsci-curl.erb'),
|
|
|
|
require => File['/home/jenkins'],
|
|
|
|
}
|
|
|
|
|
2013-09-11 09:49:24 -07:00
|
|
|
file { '/home/jenkins/.mavencentral-curl':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0600',
|
|
|
|
content => template('openstack_project/mavencentral-curl.erb'),
|
|
|
|
require => File['/home/jenkins'],
|
|
|
|
}
|
|
|
|
|
2014-11-16 19:32:44 +00:00
|
|
|
file { '/home/jenkins/.puppetforge.yml':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0600',
|
|
|
|
content => template('openstack_project/puppetforge.yml.erb'),
|
|
|
|
require => File['/home/jenkins'],
|
|
|
|
}
|
|
|
|
|
2012-11-16 13:16:26 -08:00
|
|
|
}
|