diff --git a/Jenkinsfile b/Jenkinsfile index 6d9fb59..f6eb1a3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,7 @@ pipeline { steps { withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) { bat """ - powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); @('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/','//nexus.xuqinmin.com/repository/npm-hosted/:_auth='+\$auth) | Set-Content .npmrc" + powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); Set-Content .npmrc ('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/' + [char]10 + '//nexus.xuqinmin.com/repository/npm-hosted/:_auth=' + \$auth) -Encoding ASCII" npm install --legacy-peer-deps """ } @@ -67,7 +67,7 @@ pipeline { steps { withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) { bat """ - powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); @('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/','//nexus.xuqinmin.com/repository/npm-hosted/:_auth='+\$auth) | Set-Content .npmrc" + powershell -NonInteractive -Command "\$auth=[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER+':'+\$env:NPM_PASS)); Set-Content .npmrc ('@xuqm:registry=https://nexus.xuqinmin.com/repository/npm-hosted/' + [char]10 + '//nexus.xuqinmin.com/repository/npm-hosted/:_auth=' + \$auth) -Encoding ASCII" npm publish --workspaces --registry %NEXUS_REGISTRY% """ }