@Dhanavath Vishnu We have update from our team on this issue.
Based on the logs the team has analyzed so far, the root cause of the issue is due to the docker CLI failing to authenticate. This issue can manifest itself in either the 'push' action or the 'deploy' action of the AzureIoTEdgeV2 devops task.
The team is still working on a permanent fix. To mitigate this in the meantime, please follow the below steps.
For
push
action:
- task: Docker@2
displayName: push
inputs:
containerRegistry: <Docker-registry-service-connection-name>
repository: '<DockerHub-repository-name>'
command: push
tags: '<module-version>-<module-arch>' #ex: 0.0.1-amd64
For
deploy
action:
- task: AzureCLI@2
displayName: 'Azure CLI '
inputs:
azureSubscription: '<Azure-Resource-Manager-service-connection-name>'
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az extension add --name azure-iot
Please make sure to delete any previous deployments if they exist and create a new deployment using the following steps.
Update to address docker login error
Replace Azure IoT Edge - Deploy to IoT Edge devices
job with this Azure CLI
job. Both are equivalent and can be used interchangeably.
- task: AzureCLI@2
displayName: 'Azure CLI '
inputs:
azureSubscription: '<Azure-Resource-Manager-service-connection-name>'
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az extension add --name azure-iot
Please ensure to delete any existing deployments and create new one using the steps below:
# Delete previous deployment, if one exists
project=$(echo $(System.TeamProject) | tr [:upper:] [:lower:])
az iot edge deployment delete --deployment-id $project-devops-deployment --hub-name <IoTHub-name> || true
# Create a new deployment
az iot edge deployment create --deployment-id $(System.TeamProject)-devops-deployment --hub-name <IoTHub-name> --content $(System.DefaultWorkingDirectory)/config/deployment.json --target-condition "deviceId='<device-name>'" --priority 10 --output none
Please let us know if you encounter any issues or need further clarifications on the above.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.