Skip to content

Commit 2b4b7e5

Browse files
committed
fix(tooling): Fix test user missing access token
1 parent d7dac40 commit 2b4b7e5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Jenkinsfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,16 @@ ansiColor('xterm') {
6767
}
6868

6969
stage('Install') {
70-
sh '''#!/bin/bash -ex
71-
source ~/.nvm/nvm.sh
72-
nvm use v6
73-
npm install
74-
'''
70+
withCredentials([
71+
string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')
72+
]) {
73+
sh '''#!/bin/bash -ex
74+
source ~/.nvm/nvm.sh
75+
nvm use v6
76+
sh 'echo \'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\' > $HOME/.npmrc'
77+
npm install
78+
'''
79+
}
7580
}
7681

7782
stage('Static Analysis') {

0 commit comments

Comments
 (0)