I would like to publish my code to an npm registry after it passes all the tests. Except I need to obviously hide the npm credentials. I am trying the following, with little luck. Perhaps someone can push me in the right direction.
the ${variable} syntax is not valid for injecting secrets (it was in older version of drone, but not newer). You will therefore need to use secrets as described here: http://docs.drone.io/manage-secrets/
the syntax in this example will not work. Drone will not replace $NPM_USERNAME or $NPM_PASSWORD with your secret values. Secrets need to be declared in the yaml as defined in https://docs.drone.io/secret/repository/
json: cannot unmarshal array into Go value of type model.Secret
are you using the correct server address with the CLI? We see this error frequently when someone using the HTTP address with the CLI instead of the HTTPS address. Also note that you can manage secrets in the user-interface if you do not want to use the CLI.
Yep you were totally right on both accounts. Thanks
The syntax didnât work it used them as strings so it appeared to work but of course my username and password arenât â$NPM_USERNAMEâ & â$NPM_PASSWORDâ.
And swapping from http to https did the trick
Also using the GUI is a nice tip, perhaps we should add that to the docs?