I created the pipeline which downloads specific artifact from ADO Artifacts in my org/project. Now, the requirement needs to be extended, because artifacts will be keep in different org/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 org/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 org/project? Or maybe it is possible that above one would track uploaded artifacts in different org/project? Than I would have only one modified above pipeline with extra configuration on ADO site, if I am right?
To download Universal Packages from another organization, you can refer to the following steps:
Create a PAT with Packaging(Read & write) scope in your source organization.
Create an Azure Repos/Team Foundation Server service connection in your target organization, where you download universal packages.
Modify your pipeline to download packages from other organizations.
- 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}'