huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
47 stars 22 forks source link

Pass Build.TriggeredBy.BuildId predefined variable as build parameter in Trigger Build Task #258

Open bencemali opened 2 months ago

bencemali commented 2 months ago

When using the built-in build completion trigger in azure devops, the predefined variable Build.TriggeredBy.BuildId is set to the build id of the triggering build. The Trigger Build Task could pass the value of Build.BuildId as an additional parameter with the name Build.TriggeredBy.BuildId to the triggered build, thus avoiding confusion. Right now the following can be added as a "workaround" to the additional build parameters to achieve this:

{"Build.TriggeredBy.BuildId" : "$(Build.BuildId)" }
huserben commented 1 month ago

Hi @bencemali

Thanks a lot for sharing this. This was either not yet available when I started creating the task or I was unaware of it.

I right now don't plan any updates on the task, so I'll leave this issue open so it might help others. If I'd update the task going forward, I'll include this though, it seems straight forward enough. In that case, I'd be notifying you here.