maikvandergaag / msft-extensions

Repository for extensions mainly used for Azure DevOps Extensions
https://msftplayground.com
MIT License
126 stars 81 forks source link

Trigger build pipeline from the release pipeline - How to actually pass a variable from release to build pipeline? #429

Closed nkatunov closed 1 year ago

nkatunov commented 1 year ago

For which extension would you like to add a feature request? Trigger Azure DevOps Pipeline Question I am triggering the build pipeline from the release pipeline and I need to pass a build number variable to the build pipeline. I was trying to use the "Release variable json" field for that with no luck. What I put in here is not set to env variables or to the params passed to the build pipeline. Is there a way to pass a variable?

maikvandergaag commented 1 year ago

@nkatunov: you should be able to put in parameters for the builds. The naming of the field is a bit off but this should work: Release variable json

nkatunov commented 1 year ago

Can you give a bit more specific example pls: Like if I set Release variable json value to {'name': 'test'} I should be able to get this value from my build pipeline by addressing it using parameters? If I specify parameter: name in build yaml file I get an error: "name param is not available". So it seems that the build pipeline cannot see the "name" param set in the Release variable json field in the plugin

maikvandergaag commented 1 year ago

You also have to configure parameters in your build pipeline.

nkatunov commented 1 year ago

Yes, that is what I did, did not help

maikvandergaag commented 1 year ago

Then please share more info like logs and screenshots like mentioned in the template

maikvandergaag commented 1 year ago

As there was no response will close the ticket for now. If you still have the question please reopen and share the log files