zuul-jobs/roles/upload-npm/templates/.npmrc.j2
Ian Wienand 1520fb6474 upload-npm : support authToken argument
Support setting authToken to use a token for upload rather than
username/password.

This is "based" on Id0c47d088d6e8febbae3c96caecc81ebe247754e which
does the same for pypi.  There we run a test by uploading to the test
pypi server, I'm not aware of a similar thing for npm.

Change-Id: Ie8610bdfaa33b2120a61802c12e6ba534fe55464
2022-09-07 13:27:01 +10:00

14 lines
513 B
Django/Jinja

init.author.name={{ npm_credentials.author_name }}
init.author.email={{ npm_credentials.author_email }}
init.author.url={{ npm_credentials.author_url }}
tag-version-prefix=
sign-git-tag=true
{% if npm_credentials.username is defined %}
//registry.npmjs.org/:username={{ npm_credentials.username }}
//registry.npmjs.org/:_password={{ npm_credentials.password }}
{% else %}
//registry.npmjs.org/:_authToken={{ npm_credentials.authToken }}
{% endif %}
//registry.npmjs.org/:email={{ npm_credentials.author_email }}