Sep 13 2022
02:43 AM
- last edited on
Mar 05 2024
02:02 PM
by
TechCommunityAP
Sep 13 2022
02:43 AM
- last edited on
Mar 05 2024
02:02 PM
by
TechCommunityAP
Team,
I have created this task
- task: AzureCLI@1
displayName: 'Tag Prod Containers'
inputs:
azureSubscription: Production
scriptLocation: inlineScript
inlineScript: |
readarray -t images <<< $(grep -E 'repository|tag' $(Pipeline.Workspace)/values/higher-values.yaml|awk '{print $2}')
registry=$(awk -F. '{print $1}' <<< ${images[0]}|tr -d '\n')
kongingress=$(awk -F/ '{print $2}' <<< ${images[0]}|tr -d '\n')
kong=$(awk -F/ '{print $2}' <<< ${images[2]}|tr -d '\n')
echo "------------------"
sed -z 's/\n/ /g' <<< $(tr -d '\n' <<< ${images[2]})@${{ parameters.Digest_Id }}
sed -z 's/\\n/ /g' <<< $(tr -d '\n' <<< ${images[2]})@${{ parameters.Digest_Id }}
echo "------------------"
But output is always coming like this. A new line after kong word.