system-config/modules/openstack_project/manifests/signing_node.pp
Jeremy Stanley 5950ea063b Add python3-yaml to signing node
Upcoming release automation additions are Py3K-only and need PyYAML
available to the Python3 interpreter on the signing node. Install
the python3-specific build of the library (the python2 version is
already being installed elsewhere).

Change-Id: Ifb435ea9c5d99639e1562761f9c48cbefb9db57f
2017-05-05 20:01:39 +00:00

108 lines
2.9 KiB
Puppet

# Copyright 2016 OpenStack Foundation
#
# 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.
#
# Class to install dependencies for uploading releases to pypi, maven and
# similar external repositories
#
class openstack_project::signing_node (
$jenkins_ssh_public_key,
$pubring,
$secring,
$lp_access_token,
$lp_access_secret,
$lp_consumer_key,
$gitfullname = 'OpenStack Release Bot',
$gitemail = 'infra-root@openstack.org',
$gitpgpkey = 'infra-root@openstack.org',
$gerrituser = 'release',
$gerritkey = undef,
$project_config_repo = 'https://git.openstack.org/openstack-infra/project-config',
$packaging_keytab = '',
) {
class { 'openstack_project::slave':
thin => true,
ssh_key => $jenkins_ssh_public_key,
jenkins_gitfullname => $gitfullname,
jenkins_gitemail => $gitemail,
jenkins_gitpgpkey => $gitpgpkey,
jenkins_gerrituser => $gerrituser,
jenkins_gerritkey => $gerritkey,
project_config_repo => $project_config_repo,
afs => true,
}
file { '/etc/packaging.keytab':
owner => 'jenkins',
group => 'jenkins',
mode => '0400',
content => $packaging_keytab,
}
package { 'gnupg':
ensure => present,
}
file { '/home/jenkins/.gnupg':
ensure => directory,
owner => 'jenkins',
group => 'jenkins',
mode => '0700',
require => File['/home/jenkins'],
}
file { '/home/jenkins/.gnupg/pubring.gpg':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0400',
content => $pubring,
require => File['/home/jenkins/.gnupg'],
}
file { '/home/jenkins/.gnupg/secring.gpg':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0400',
content => $secring,
require => File['/home/jenkins/.gnupg'],
}
package { 'python-launchpadlib':
ensure => present,
}
file { '/home/jenkins/.launchpadlib':
ensure => directory,
owner => 'jenkins',
group => 'jenkins',
mode => '0700',
require => File['/home/jenkins'],
}
file { '/home/jenkins/.launchpadlib/creds':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0600',
content => template('openstack_project/infra_lp_creds.erb'),
require => File['/home/jenkins/.launchpadlib'],
}
package { 'python3-yaml':
ensure => present,
}
}