I have a multi-branch pipeline for a private NPM package.
Within my Jenkinsfile I have a defined a "Publish" stage within my pipeline script for automatically deploying after a successful CI build. This stage looks like:
When the script for npm login fires I get an error:
[workspace] Running shell script
+ npm adduser
Username: (jenkins) npm ERR! cb() never called!
I could put the credentials in the script, but man does that suck. I spent a good amount of time setting up the credentials repository in Jenkins so that slick developers wouldn't be able to hold me hostage!
How can I get authentication to work?
We're internally using Sonatype Nexus for our internal hosted NPM registry. I have two configuration files stored, one for accessing the proxy repository (combo of public npmjs and our hosted) and our hosted.