Friday, January 3, 2020

Read NuGet Artifacts of External Azure DevOps Organization Feed

Azure DevOps artifacts feeds can be used to store different kind of artifacts of projects of your organization created. Sometimes we may need to use these artifacts in outside Azure DevOps organization. This post explains how can share feeds between organizations.

Prerequisites: PAT from the external Azure DevOps organization with feed read permission
                        External organization has feeds with NuGet packages in it
Let's get started.

If you want to read feed content from external Azure DevOps organizations most important thing is to create the connection between your Azure DevOps organization and the external Azure DevOps organization. To do that, you can create a service connection to connect with the external Azure DevOps organization feed.

Go to project settings of Azure DevOps and select service connections under pipelines section. Click new service connection button to start service connection creation process.


You would be able to see the the pane with service connection types. Select the relevant service connection type and click on next button. This sample we use NuGet as service connection type.


In the next step it allows you to select Authentication method. As we are going to read feed from external Azure DevOps server, select External Azure DevOps Server radio button. After that you can give the external feed URL and PAT. Give the name for service connection and click on save to complete the creation process.


Now you can read the content from external Azure DevOps organization artifact feed. As example we can use external feed NuGet as follows in the pipelines. Following image shows the NuGet restore task use in the pipelines. We can get external feed content by providing the service connection.



This post explained how to get feed content from external Azure DevOps organization through service connection and use it in pipelines.

No comments:

Post a Comment