0
votes

I have a problem on my build/release pipeline with Azure Container Reigstry.

I use a Azure Resource Group Deployment task to deploy Azure Container Registry (and other stuff) and it works perfectly. I have the loginServer, username and password in output variables to reuse it.

Then I want to build and push image to ACR but I can't set the name of the registry (that I get from output variable) with a variable. I have to choose the registry when I setup the definition, but it is not created at this moment.

Is there a way to do this ?

As a workaround, I use the Azure Resource Group Deployment the create the registry and then I send output variables to a powershell script which build, tag and push my images to the registry.

If nobody has a better way, I think I will post a uservoice to change that.

2

2 Answers

0
votes

When you say you use an Azure Resource Group Deployment task, are you referring to VSTS? If you could provide more specific repro steps, I might be more helpful.

I'd also suggest you might take a look at https://aka.ms/acr/build as easy way to natively docker build images with your registry. ACR Build is now available in all regions and simplifies may of the experiences you may be hitting. Daniel just made this post that helps with the VSTS integration: https://www.danielstechblog.io/building-arm-based-container-images-with-vsts-and-azure-container-registry-build/ Steve

0
votes

Sorry for the delay, I was off the office.

I just retry to fix my problem and it seems that I can now enter a free text (and so, a release variable) to the VSTS docker task to specify the ACR I just created before with a Azure Resource Group Deployment task.

So no problem anymore. Thank you for your response, I will take a look to ACR build :)

Bastien