Update Jenkinsfile for npm auth with github package registry
This commit is contained in:
committed by
lenhanphung
parent
aa9920dbbb
commit
ecc844de0a
Vendored
+7
@@ -3,6 +3,7 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
DOCKER_HUB_CREDENTIAL = credentials('dockerHub')
|
DOCKER_HUB_CREDENTIAL = credentials('dockerHub')
|
||||||
|
GITHUB_CREDENTIAL = credentials('github')
|
||||||
}
|
}
|
||||||
|
|
||||||
tools {
|
tools {
|
||||||
@@ -18,6 +19,12 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Compile') {
|
stage('Compile') {
|
||||||
steps {
|
steps {
|
||||||
|
sh '''
|
||||||
|
cat > .npmrc << EOF
|
||||||
|
@linagora:registry=https://npm.pkg.github.com/
|
||||||
|
//npm.pkg.github.com/:_authToken=${GITHUB_CREDENTIAL_PSW}
|
||||||
|
EOF
|
||||||
|
'''
|
||||||
sh 'npm install'
|
sh 'npm install'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user