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
This fixes a number of places where we do not have spaces between
filters. I think that this is a reasonable rule for readability (I
also think it probably was enforced, but maybe later versions got
better at detecting it?).
These are detected by a later version of Ansible lint; this change
should have no operational change to any roles but prepares us to
update in a follow-on change.
Change-Id: I07e1a109b87adce86f483d14d7e02fcecb8313d5
It looks like we never got around to cleaning this up after the npm
5.6.0 over 3 years ago. Now it seems to be causing the error
described in https://github.com/nodejs/help/issues/2874 so let's go
back to using the (presumed working) version of npm which the
node/nvm installation provides.
This reverts commit 0cd5075466ac77565f41074c28b05b0ad1459d86.
Change-Id: I0be3e8fd39845e82790b29d9f2c1e1179cb69e23
When using npm to install locally, it wants to write a node_modules
tree in the current path. Since the default path of a command is the
path where the playbook resides and this is not writeable on a zuul
executor, change to the writeable workdir first.
Change-Id: Ib4f632c0b9e3f5842e3cd649b6ca7ecb8042e7e3
npm5 has an issue uploading tarballs it didn't build. For now, install
npm4 and use that to upload our tarballs.
The fix for https://github.com/npm/npm/issues/16723 should be in 5.6.0
which should allow us to revert this.
Change-Id: I8f633ee2119218799706b47ba3b471dcb04c1253
According to https://github.com/creationix/nvm#install-script,
we should, you know, actually source the script rather than just cloning
the repo and then ignoring it.
Change-Id: I046af8d38cf7288fcb3fac74cd6839d4e006ca90
This job was using npm_info as the name for the credentials
secrets, but it is actually named npm_credentials. Updating
all references to use the correct variable name.
Change-Id: I2959ec788ffa39e32e66caf3a3a16c2441636a51
We need a role for uploading content to npm. The old script assumed a
global npm install - but as this runs on the executor we shouldn't
assume that. Use nvm to install node into the work_dir and use the npm
from that node installation.
Change-Id: I7f7c031ce754838776043325025fe5928cd36135