Added recent version of npm to release slave
This patch clears the previous npm cleanup steps, and then uses the npmjs module installed on the release slave to manage the nodejs install. It installs node 0.12.7 and pm version 2.11.3. It also updates the .npmrc file for our jenkins user, forcing each `npm version` command to sign the generated version git tag (sign-git-tag), and override the npm default version prefix ('v') to openstack's (''). Change-Id: Id4bd49329db25d62a06a57b665945dc351450198
This commit is contained in:
parent
4b1b542322
commit
6beb13b667
@ -53,25 +53,17 @@ class openstack_project::release_slave (
|
||||
require => Class['pip'],
|
||||
}
|
||||
|
||||
exec { 'uninstall /usr/local/bin/npm':
|
||||
command => 'npm uninstall npm --prefix=/usr/local -g',
|
||||
onlyif => 'test -d /usr/local/lib/node_modules',
|
||||
path => '/usr/local/bin:/usr/bin',
|
||||
class { '::nodejs':
|
||||
repo_url_suffix => 'node_0.12',
|
||||
}
|
||||
|
||||
package { ['npm', 'nodejs', 'nodejs-legacy']:
|
||||
ensure => purged,
|
||||
require => Exec['uninstall /usr/local/bin/npm'],
|
||||
}
|
||||
|
||||
file { ['/usr/share/npm',
|
||||
'/usr/lib/node_modules',
|
||||
'/root/.npm',
|
||||
'/etc/npmrc',
|
||||
'/home/jenkins/.npmrc']:
|
||||
ensure => absent,
|
||||
force => true,
|
||||
require => Package['npm']
|
||||
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/.pypirc':
|
||||
|
@ -4,6 +4,8 @@
|
||||
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) %>
|
Loading…
Reference in New Issue
Block a user