Skip to main content

npm

用来发布库到仓库。下面是示例

kind: pipeline
name: default

steps:
- name: npm
image: plugins/npm
settings:
username: bob
password: password
email: bob@bob.me

从密钥里获取 token

steps:
- name: npm
image: plugins/npm
settings:
username: bob
password:
from_secret: npm_password
email: bob@bob.me

使用自定义仓库

steps:
- name: npm
image: plugins/npm
settings:
username: bob
password: password
email: bob@bob.me
registry: "http://myregistry:4873"

npm 企业版认证

NPM企业用户可以选择使用授权令牌进行身份验证。 令牌将始终覆盖用户名和密码身份验证方法。

steps:
- name: npm
image: plugins/npm
settings:
username: bob
password: password
token: f0e4c2f76c58916ec25
email: bob@bob.me

参数参考

username the username for the account to publish with password the password for the account to publish with token the deploy token to publish with email the email address associated with the account to publish with. registry the registry URL. defaults to https://registry.npmjs.org. folder the folder, relative to the workspace, containing the library. defaults to the workspace directory.

参考