fix: use string concat for npm auth to avoid Jenkins sandbox GString.getBytes restriction
这个提交包含在:
父节点
5ec94b074b
当前提交
4b1a85f04f
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -68,7 +68,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
||||||
script {
|
script {
|
||||||
def auth = "${NPM_USER}:${NPM_PASS}".bytes.encodeBase64().toString()
|
def auth = (NPM_USER + ':' + NPM_PASS).bytes.encodeBase64().toString()
|
||||||
writeFile file: '.npmrc', text: "//nexus.xuqinmin.com/repository/npm-hosted/:_auth=${auth}\n"
|
writeFile file: '.npmrc', text: "//nexus.xuqinmin.com/repository/npm-hosted/:_auth=${auth}\n"
|
||||||
bat "npm publish --registry %NEXUS_REGISTRY%"
|
bat "npm publish --registry %NEXUS_REGISTRY%"
|
||||||
}
|
}
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户