Commit Graph

11 Commits

Author SHA1 Message Date
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
Ian Wienand f76cfbab11 linters: fix spaces between filters
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
2022-07-27 17:13:39 +10:00
Zuul 6931e1cb9c Merge "Clone nvm from official source" 2021-03-22 02:17:49 +00:00
Monty Taylor 35b33341c4 Clone nvm from official source
nvm is now hosted at nvm-sh/nvm.

Change-Id: Idc00830e8404f556f8ebf38c93e67c2e574bf412
2021-03-20 10:10:14 -05:00
Jeremy Stanley bac0326c00 Revert "Pin to npm4 until npm 5.6.0 comes out"
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 0cd5075466.

Change-Id: I0be3e8fd39845e82790b29d9f2c1e1179cb69e23
2021-03-20 13:30:34 +00:00
Jeremy Stanley 8b577d4106 Change to the executor workdir during npm upload
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
2017-12-09 17:27:56 +00:00
Monty Taylor 0cd5075466
Pin to npm4 until npm 5.6.0 comes out
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
2017-12-08 17:20:51 -06:00
Monty Taylor 2862cddb6a
Source nvm before using it
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
2017-12-06 11:29:11 -06:00
Sean McGinnis a34de95685 Fix variable name in npm-publish job
Variable work_root was accidentally set as work_dir.

Change-Id: Ib0650027565308e04235b9b7ca48b6470f1f1a0c
2017-12-04 15:35:25 -06:00
Sean McGinnis fb6c63eac2 Update upload-npm credentials secret
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
2017-11-22 09:49:19 -06:00
Monty Taylor 20f7528a09
Add upload-npm role
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
2017-10-09 15:41:20 -05:00