Parameters of a SQueuedBuild

I am implemeting `BuildServerListener#buildRemovedFromQueue(SQueuedBuild)`.In this method, I need to know the value of a parameter that was set explicitly when the build was queued, and I don't find any API for that. Is it even possible?

If it matters, the builds I am interested in are triggered through the REST API, (we post to buildQueue and we set the parameters in the body of the HTTP request).

2 comments
Comment actions Permalink

I just found what I was looking for. `SQueuedBuild#getTriggeredBy` Returns an object that contains these parameters (`TriggeredBy#getParameters`)!

0
Comment actions Permalink

Turns out that `TriggeredBy#getParameters` does not contain the parameters of the build, but only some information on who triggered the build and when...

I think I found the right way to get what I need: `SQueuedBuild#getBuildPromotion` returns an object on which I can call `getBuildParameters`. I looked around but I still have no idea what a BuildPromotion is (I thought it was only related to the "promote build" action in the UI, but apparently it's unrelated).

0

Please sign in to leave a comment.