Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,514 views 4 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you