I’m trying to deploy an Azure Container App using an Azure DevOps Pipeline. It’s pushing a new image to my ACR but the Container App is not running the new image. My understanding is that it should be creating a new revision with the new image but the only revisions / replicas are a couple of weeks ago, possibly from when I tried to use the publish feature in Visual Studio to do it.
I’m new to container apps so I’m not sure if there’s something that needs to be configured in Azure so that it automatically pulls the new image or if the pipeline is meant to do this.
My yaml is:
trigger:
- main
pool:
vmImage: ubuntu-latest
name: '$(Date:yyyyMMdd).$(Rev:rr)' # Set build number
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'BackEnd/BackEnd.csproj'
- task: AzureContainerApps@1
inputs:
appSourcePath: '$(Build.SourcesDirectory)'
azureSubscription: 'my-service-connection'
acrName: 'MyAcr'
containerAppName: 'my-backend-app'
resourceGroup: 'myresourcegroup'
imageToBuild: MyAcr.azurecr.io/my-backend-app:$(Build.BuildNumber)
Note: I’ve tweaked some azure resource names that I’d rather not be public
My container app has a managed identity and has the AcrPull permission for my ACR.
Can anyone help?