Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,902
Community Members
 
Community Events
168
Community Groups

Use Azure Artifacts with BitBucket Pipelines

Hello,

 

I would like to understand if i can use azure artifacts as a nuget repo for my existing BitBucket Pipelines.

2 answers

1 accepted

1 vote
Answer accepted

Hi @VR ,

Thank you for your question!

It's a good case to use our ready-to-go template.

And don't forget setup your nuget source before according to the dotnet nuget add source guide.

dotnet nuget add source https://azureartifacts.microsoft.com/myTeam -n myTeam

How does the authorization work? Where can we store the authorization credentials?

@VR did you get this working? Interested in the same answer as @Uwe Eichkorn above, none of the links provided document how authorization should be handled.

I'm in the process of setting it up, but so far looks like I may need to install the Azure Artifacts Credential Provider and insert an environment variable containing the PAT during each build. Would be great if I could find a quicker way of doing it. 

For the benefit of anyone having trouble with authentication I followed these steps;

  1. Login into Azure
  2. Get the URL for your Azure NuGet artifact feed
  3. Set up a Personal Access Token (PAT) in Azure, grant the PAT read only access to Packages
  4. Add the token generated in step 1 to a new environment variable in BitBucket (I'd suggest making it a secured variable but your call) for the repository you want to access your Azure NuGet feed from
  5. In your build pipeline yaml add the following step before you do your dotnet build;
    dotnet nuget add source {your feed url - should end with nuget/v3/index.json } -n NameOfYourFeed -u unused -p ${name of the variable from step 4} --store-password-in-clear-text

Hi @Soumyadeep Mandal - SaM These do provide several articles but unfortunately these do not provide any information on using external nuget feeds such as  azure artifacts repos with bitbucket pipelines. 

Like Soumyadeep Mandal - SaM likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events