NPM Auth

The example Yaml configurations in this file are using the legacy 0.8 syntax. If you are using Drone 1.0 or Drone Cloud please ensure you use the appropriate 1.0 syntax. Learn more here.

This plugin is used to generate an .npmrc file locally to authenticate against any public/private NPM repository. The below pipeline configuration demonstrates simple usage:

pipeline:
  npm_auth:
    image: robertstettner/drone-npm-auth
    username: joebloggs
    password: mypass
    email: jb@me.com

Example configuration using credentials from secrets:

pipeline:
  npm_auth:
    image: robertstettner/drone-npm-auth
-   username: joebloggs
-   password: mypass
-   email: jb@me.com
+   secrets: [ npm_username, npm_password, npm_email ]

Secret Reference

npm_username
The NPM username.
npm_password
The NPM password.
npm_email
The NPM email.

Parameter Reference

username
The NPM username. Required.
password
The NPM password. Required.
email
The NPM email. Required.
registry
The NPM registry. Defaults to the default NPM registry.
scope
Scope of the NPM authentication. Optional.
path
Output path of the generated .npmrc file. Defaults to ./.