Not sure if there is a way to do this, but I would like to see the parameters from a yaml pipelines previous run so I can see what was entered or selected at the time the pipeline was run. Is that possible? Only work around I've found is to add tags based of each parameter.
You can see the parameter selected in the job log from the Build Summary UI page. See below:
Go the Build Summary of previous run, select the job under Jobs, Click on the Job as below highlighted, then expand the Parent pipeline used these runtime parameters
.
Another workaround beside adding tags based of each parameter is to add a script task in your pipeline to output the parameters. So that you can check out what parameters are selected from the task log later.
- script: |
echo "image ---> ${{parameters.image}}"
echo "name ---> ${{parameters.name}}"
displayName: 'Parameters Selected'
You can also call rest api to get the job log of previous run. The selected parameters is usually in the log with id = 2
https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/logs/2?api-version=5.1
See below example, get the log with id = 2
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