Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Use Azure Artifacts with BitBucket Pipelines

VR January 11, 2021

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
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2021

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
Uwe Eichkorn July 15, 2021

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

toniq-dave September 19, 2021

@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. 

Ian Webster October 14, 2021

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
2 votes
Soumyadeep Mandal - SaM
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2021
VR January 18, 2021

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
Soumyadeep Mandal - SaM
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2021

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events