Is it possible to create a custom build parameters provider?

Is it possible for a plugin to provider a custom build parameter type?

For example, let's a build uses a parameter like so: %myplugin.key%. I want my plugin to "intercept" when that gets resolved and populate it using my own logic.

Similarly, I would also want to intercept when the parameter is written to using the ##teamcity things.

Is this or something like it possible?

1 comment
Comment actions Permalink

Sorry for huge delay, see my answer below if it is still actual.

As to parameters provider, yes, this is possible. Please have a look at jetbrains.buildServer.serverSide.parameters.BuildParametersProvider extension. You can find examples of it's implementation in Groovy plugin: https://confluence.jetbrains.com/display/TW/Groovy+plug

As to intercepting ##teamcity, I suppose you'd like to add your own custom service message, right? If you want to do something with this service message on the server side, have a look at jetbrains.buildServer.messages.serviceMessages.ServiceMessageTranslator extension. Since 10.0 you can also intercept messages on the agent side, see: jetbrains.buildServer.agent.messages.BuildMessagesTranslator

 

0

Please sign in to leave a comment.