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'],
|
require => Class['pip'],
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'uninstall /usr/local/bin/npm':
|
class { '::nodejs':
|
||||||
command => 'npm uninstall npm --prefix=/usr/local -g',
|
repo_url_suffix => 'node_0.12',
|
||||||
onlyif => 'test -d /usr/local/lib/node_modules',
|
|
||||||
path => '/usr/local/bin:/usr/bin',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package { ['npm', 'nodejs', 'nodejs-legacy']:
|
file { '/home/jenkins/.npmrc':
|
||||||
ensure => purged,
|
ensure => present,
|
||||||
require => Exec['uninstall /usr/local/bin/npm'],
|
owner => 'jenkins',
|
||||||
}
|
group => 'jenkins',
|
||||||
|
mode => '0600',
|
||||||
file { ['/usr/share/npm',
|
content => template('openstack_project/npmrc.erb'),
|
||||||
'/usr/lib/node_modules',
|
require => File['/home/jenkins'],
|
||||||
'/root/.npm',
|
|
||||||
'/etc/npmrc',
|
|
||||||
'/home/jenkins/.npmrc']:
|
|
||||||
ensure => absent,
|
|
||||||
force => true,
|
|
||||||
require => Package['npm']
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/jenkins/.pypirc':
|
file { '/home/jenkins/.pypirc':
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
init.author.name=<%= jenkins_gitfullname %>
|
init.author.name=<%= jenkins_gitfullname %>
|
||||||
init.author.email=<%= jenkins_gitemail %>
|
init.author.email=<%= jenkins_gitemail %>
|
||||||
init.author.url=<%= npm_userurl %>
|
init.author.url=<%= npm_userurl %>
|
||||||
|
tag-version-prefix=
|
||||||
|
sign-git-tag=true
|
||||||
|
|
||||||
//registry.npmjs.org/:username=<%= npm_username %>
|
//registry.npmjs.org/:username=<%= npm_username %>
|
||||||
//registry.npmjs.org/:_password=<%= Base64.encode64(npm_userpassword) %>
|
//registry.npmjs.org/:_password=<%= Base64.encode64(npm_userpassword) %>
|
Loading…
Reference in New Issue
Block a user