Open cristianrgreco opened 8 months ago
I also spent a bit of time debugging this "issue". The check seems to make sense so just having something in the docs would be appreciated.
The KubernetesManifest@1 is not updating the image is there any updates on this bug ?
New issue checklist
Task name
KubernetesManifest
Task version
v0 and v1
Issue Description
I have the following example Kubernetes manifest:
I have configured this DevOps task to update the container image:
Expected: The container image is updated to
registry2.azurecr.io/repository2:${{parameters.version}}
.Actual: The container image is not updated. No warnings or errors logged.
I've found the code which is responsible, it's here: https://github.com/microsoft/azure-pipelines-tasks/blob/v232/Tasks/KubernetesManifestV1/src/utils/KubernetesObjectUtility.ts#L339-L363
See that it will only update the image if the registry/repository match. I don't know what the reasoning is (we assume it's because the manifests/containers are both lists and could not be in-order), but if it's expected, please update the
containers
part of the task documentation to say this.This took several hours to figure out why the container image was not updating.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu 20.04
Relevant log output
Full task logs with system.debug enabled
Repro steps
No response