Is there a task or command that I can use to output all the parameters variable in a Azure DevOps template when the pipeline is run?
I would like the first task in the pipeline to print all parameters, that would help to spot mistakes.
Any suggestions
I was also faced with this requirement and found the following solution:
- script: |
echo "${{ convertToJson(parameters) }}"
Documentation for convertToJson
I've found this to work for me: (as just using the respond above gave an error)
- powershell: |
$jsonParams = '${{ convertToJson(parameters) }}'
Write-Host $jsonParams
displayName: 'Print parameters in JSON format'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With