我们如何配置以从基于 yaml 的 azure CI 管道的 Jfrog 工件中提取 npm 包?

how can we configure to pull npm packages from Jfrog artifacts for yaml based azure CI Pipeline?

我想为前端 angular 应用程序配置 Azure DevOps yaml CI 管道,我需要从 Jfrog Artifacts 中明确获取所有 npm 包。

任何人都可以帮助我,我如何定义端点以将 jfrog npm 包作为 npm 安装。

我已尝试按照以下内容进行操作 link 但无法获得有意义的内容。

https://www.jfrog.com/confluence/display/JFROG/Pipeline+Example%3A+Hello+World

我写了下面的代码-

pool:
  name: 'myProject'

variables:
  BuildConfiguration: 'Release'

trigger:
- master

steps:
- task: Npm@1
  displayName: 'npm install from jfrog artifactory'
  inputs:
    workingDir: Web
    verbose: false

- task: ArchiveFiles@2
  displayName: 'Archive files'
  inputs:
    rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
    includeRootFolder: false

- task: PublishBuildArtifacts@1
  displayName: 'Publish artifacts: drop'

configure to pull npm packages from Jfrog artifacts

Artifactory 通过 JFrog Artifactory Extension.

提供紧密集成的 Azure DevOps

Artifactory Generic Download task 支持将构建依赖项从 Artifactory 下载到构建代理。该任务触发 JFrog CLI to perform the download. The downloaded dependencies are defined using File Specs 并且还可以配置为捕获构建信息。它会将下载的文件作为依赖项存储在构建信息中。

该扩展添加了以下任务:Artifactory NuGet、Artifactory .NET Core、Artifactory Maven、Artifactory Gradle、Artifactory npm 和 Artifactory Go,以支持与 Artifactory 的完整构建集成。所有任务都允许解决依赖关系并从 Artifactory 部署工件。

document 将为您提供指导。