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?
1 Answer
Reset to default 1To download Universal Packages from another anization, you can refer to the following steps:
Create a PAT with Packaging(Read & write) scope in your source anization.
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
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}'