Update Jenkinsfile for npm auth with github package registry

This commit is contained in:
Rene Cordier
2025-12-31 15:32:34 +07:00
committed by lenhanphung
parent aa9920dbbb
commit ecc844de0a
Vendored
+7
View File
@@ -3,6 +3,7 @@ pipeline {
environment {
DOCKER_HUB_CREDENTIAL = credentials('dockerHub')
GITHUB_CREDENTIAL = credentials('github')
}
tools {
@@ -18,6 +19,12 @@ pipeline {
stages {
stage('Compile') {
steps {
sh '''
cat > .npmrc << EOF
@linagora:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${GITHUB_CREDENTIAL_PSW}
EOF
'''
sh 'npm install'
}
}