PSDevOps
PSDevOps copied to clipboard
Start-ADOBuild BulkRun
Hi,
I created a small powershell script which is able to run a set of Azure Devops Pipeline based on a csv file with required parameters. As devops its very usefull for me. Take a look bulkrun.
@antdimot this is a nifty little script.
Are you suggesting updates to Start-ADOBuild?
@StartAutomating yes I think you can integrate this feature.
@antdimot this can already be done in a fairly PowerShell happy way, via the magic of the object pipeline and ValueFromPipelineByPropertyName.
It would be a bit easier with different column names, and a different column format.
Import-Csv .\Builds.csv |
Start-ADOBuild -Organization Org -Project Project -DefinitionName { $_.Definition } -Parameters {
$params = [Ordered]@{}
foreach ($kv in -in $_ -split ';') {
$k, $v = $kv -split '=', 2
$params[$k] = $v
}
$params
}
If you wanted to modify Start-ADOBuild slightly to automatically convert some forms of strings in parameters to use this format, we could. Otherwise, I think it "works" mostly out of the box.
Sorry to take a bit to get back, I am sometimes slow to point out the ways a request is already accommodated / easy to accommodate.
If you feel strongly that Start-ADOBuild should work the way I've mentioned, please re-open the issue and re-title it.
@StartAutomating I agree with you because your solution it's flexible.