Merge "Added NPM Publishing credentials to pypi slave."
This commit is contained in:
commit
53676ea705
@ -742,6 +742,9 @@ node 'release.slave.openstack.org' {
|
||||
mavencentral_password => hiera('mavencentral_org_password', 'XXX'),
|
||||
puppet_forge_username => hiera('puppet_forge_username', 'username'),
|
||||
puppet_forge_password => hiera('puppet_forge_password', 'XXX'),
|
||||
npm_username => 'openstackci',
|
||||
npm_userpassword => hiera('npm_user_password', 'XXX'),
|
||||
npm_userurl => 'https://openstack.org',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,9 @@ class openstack_project::release_slave (
|
||||
$jenkins_gitfullname = 'OpenStack Jenkins',
|
||||
$jenkins_gitemail = 'jenkins@openstack.org',
|
||||
$project_config_repo = 'https://git.openstack.org/openstack-infra/project-config',
|
||||
$npm_username,
|
||||
$npm_userpassword,
|
||||
$npm_userurl,
|
||||
) {
|
||||
class { 'openstack_project::slave':
|
||||
ssh_key => $jenkins_ssh_public_key,
|
||||
@ -50,6 +53,10 @@ class openstack_project::release_slave (
|
||||
require => Class['pip'],
|
||||
}
|
||||
|
||||
package { ['nodejs', 'nodejs-legacy', 'npm']:
|
||||
ensure => latest
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.pypirc':
|
||||
ensure => present,
|
||||
owner => 'jenkins',
|
||||
@ -59,6 +66,15 @@ class openstack_project::release_slave (
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.npmrc':
|
||||
ensure => present,
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0600',
|
||||
content => template('openstack_project/npmrc.erb'),
|
||||
require => File['/home/jenkins'],
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.jenkinsci-curl':
|
||||
ensure => present,
|
||||
owner => 'jenkins',
|
||||
|
12
modules/openstack_project/templates/npmrc.erb
Normal file
12
modules/openstack_project/templates/npmrc.erb
Normal file
@ -0,0 +1,12 @@
|
||||
<%
|
||||
require 'base64'
|
||||
%>
|
||||
init.author.name=<%= jenkins_gitfullname %>
|
||||
init.author.email=<%= jenkins_gitemail %>
|
||||
init.author.url=<%= npm_userurl %>
|
||||
tag-version-prefix=
|
||||
sign-git-tag=true
|
||||
|
||||
//registry.npmjs.org/:username=<%= npm_username %>
|
||||
//registry.npmjs.org/:_password=<%= Base64.encode64(npm_userpassword) %>
|
||||
//registry.npmjs.org/:email=<%= jenkins_gitemail %>
|
Loading…
Reference in New Issue
Block a user