使用 Jenkins 作业中的 Artifactory 凭据更新 .npmrc 文件

Update .nprmc file with Artificatory credentials from Jenkins job

我正在尝试将我的 npm 模块发布到 Jenkins 的 artifactory 存储库。有人可以帮助我如何从 Jenkins 作业向 .nprmc 文件添加人工凭证吗?我正在尝试使此凭据配置作业具体化。

您可以使用 Jenkins Artifactory plugin 轻松发布 npm 模块。 有了它,您不必在 .npmrc 中配置凭据 - 插件已经为您完成了。您还将获得其他好处,例如 build information.

声明式管道:参见documentation here and an example此处。

脚本化管道:参见documentation here and an example此处。