最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure - Download artifact from different ADO organization - Stack Overflow

programmeradmin3浏览0评论

I created the pipeline which downloads specific artifact from ADO Artifacts in my /project. Now, the requirement needs to be extended, because artifacts will be keep in different /project. My current pipeline looks like that:

stages:
- stage: Updating
  displayName: 'Updating Coin'
  jobs:
  - job: Download
    displayName: 'Updating Coin version'
    steps:
    - task: UniversalPackages@0
      displayName: 'Download Coin from Azure Artifacts'
      inputs:
        command: 'download'
        downloadDirectory: '$(Build.ArtifactStagingDirectory)/coin'
        feedsToUse: 'internal'
        vstsFeed: 'Mob/Coin-dev'
        vstsFeedPackage: 'coins'
        vstsPackageVersion: '${{ parameters.COIN_VERSION }}'

What should I add in ADO? I read so far that ServiceConnection for sure. Would be better to create the new pipeline in the /project where artifacts are keep, which will be tracking when new version of application was published, and then the second one (that above one) should consume the artifact directly from Artifacts in different /project? Or maybe it is possible that above one would track uploaded artifacts in different /project? Than I would have only one modified above pipeline with extra configuration on ADO site, if I am right?

I created the pipeline which downloads specific artifact from ADO Artifacts in my /project. Now, the requirement needs to be extended, because artifacts will be keep in different /project. My current pipeline looks like that:

stages:
- stage: Updating
  displayName: 'Updating Coin'
  jobs:
  - job: Download
    displayName: 'Updating Coin version'
    steps:
    - task: UniversalPackages@0
      displayName: 'Download Coin from Azure Artifacts'
      inputs:
        command: 'download'
        downloadDirectory: '$(Build.ArtifactStagingDirectory)/coin'
        feedsToUse: 'internal'
        vstsFeed: 'Mob/Coin-dev'
        vstsFeedPackage: 'coins'
        vstsPackageVersion: '${{ parameters.COIN_VERSION }}'

What should I add in ADO? I read so far that ServiceConnection for sure. Would be better to create the new pipeline in the /project where artifacts are keep, which will be tracking when new version of application was published, and then the second one (that above one) should consume the artifact directly from Artifacts in different /project? Or maybe it is possible that above one would track uploaded artifacts in different /project? Than I would have only one modified above pipeline with extra configuration on ADO site, if I am right?

Share edited Mar 6 at 19:35 scrapkowe asked Mar 4 at 11:47 scrapkowescrapkowe 1176 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

To download Universal Packages from another anization, you can refer to the following steps:

  1. Create a PAT with Packaging(Read & write) scope in your source anization.

  2. Create an Azure Repos/Team Foundation Server service connection in your target anization, where you download universal packages.

    • Authentication method: Token Based Authentication
    • Connection URL: The URL of your source anization
    • Personal Access Token: The PAT you create in the first step
    • Click Verify
    • Assign a "Service Connection Name"
    • Click Verify and Save
  3. Modify your pipeline to download packages from other anizations.

- task: UniversalPackages@0
  inputs:
    command: 'download'
    downloadDirectory: '$(Build.ArtifactStagingDirectory)/coin'
    feedsToUse: 'external'
    externalFeedCredentials: '{The name of your service connection}' # In this example it's universalSC
    feedDownloadExternal: '{sourceFeedName}' # Feed or Project/Feed if the feed was created in a project
    packageDownloadExternal: '{packageName}'
    versionDownloadExternal: '{packageVersion}'
发布评论

评论列表(0)

  1. 暂无评论