azure-pipelines-tasks: Azure IoT Edge: Failed to fetch container registry authentication token
Required Information
I’m trying to deploy an Azure IoT Edge module through Azure Pipelines. I’ve set up my build steps as below but it’s returning an error message on the Push module images
step
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzureIoTEdge
Environment
-
Server - Azure Pipelines
-
Agent - Hosted
Issue Description
Below is a copy of my pipeline. I have a service connection set up under the name containerregistry
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: AzureIoTEdge@2
inputs:
action: 'Build module images'
templateFilePath: 'deployment.template.json'
defaultPlatform: 'arm32v7'
- task: AzureIoTEdge@2
inputs:
action: 'Push module images'
containerregistrytype: 'Generic Container Registry'
dockerRegistryConnection: 'containerregistry'
templateFilePath: 'deployment.template.json'
defaultPlatform: 'arm32v7'
fillRegistryCredential: 'true'
Task logs
##[section]Starting: AzureIoTEdge
==============================================================================
Task : Azure IoT Edge
Description : Build and deploy an Azure IoT Edge image
Version : 2.3.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/azure-iot-edge
==============================================================================
Pushing module images...
29177abd-9970-4ff3-a171-cf8cb6824915 exists true
##[error]Error: Failed to fetch container registry authentication token, please check you container registry setting in build task. The username for container registry is
##[section]Finishing: AzureIoTEdge
Error logs
[error]Error: Failed to fetch container registry authentication token, please check you container registry setting in build task. The username for container registry is
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15 (7 by maintainers)
@charlie-haley Can you share a sample of deployment.template.json and folder structure for your project? Something in your deployment.template.json should be inconsistent with your folder structure, so the task failed to figure out images need to be pushed (just imagine there’s a dummy module in your project, which won’t be built in your pipeline). I can share how to adjust the deployment.template.json or your folder structure.
I got the same problem. @prativen @blackchoey any progress on this issue so far?
This is also the response I get when I choose the Azure Container Registry option. (which I am using) it falsely indicates a success even though nothing has been pushed to the registry.