Open sdg002 opened 2 hours ago
I have explained above. This doe not work.
I have also tried doing a patch
- task: Kubernetes@1
displayName: 'update configmap with version'
inputs:
connectionType: 'Azure Resource Manager'
azureSubscriptionEndpoint: ${{ parameters.azserviceconnection }}
azureResourceGroup: ${{ parameters.aksresourcegroup }}
kubernetesCluster: ${{ parameters.aksresourcename }}
namespace: powertrading-dev
command: patch
arguments: "configmap shared-configmap --patch '{\"data\": {\"key1\": \"newvalue1 from yaml\" }' "
But, this fails with the following error:
2024-09-19T20:40:02.7681122Z [command]/opt/hostedtoolcache/kubectl/1.31.0/x64/kubectl patch -n powertrading-dev configmap shared-configmap --patch '{data: {key1: newvalue1 from yaml }' -o json
2024-09-19T20:40:02.7731977Z error: unable to parse "'{data:": yaml: found unexpected end of stream
2024-09-19T20:40:02.7807376Z ##[error]error: unable to parse "'{data:": yaml: found unexpected end of stream
2024-09-19T20:40:02.7816495Z commandOutput
The double quotations
are being stripped off.
Can somebody suggest how I may get the above to work?
Task name
Kubernetes@1
Task version
1
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
Question
My intent is to replicate the following command:
I can't get the Devops task to update a single key-value pair. Any suggestions ?