Frage

If i need to write a jenkins plugin with multiple build steps, is it possible for these build steps to share a common config (as in the common plugin detail from global.jelly) ?

Eg: Lets say my plugin adds the following new steps.. Build Step, Deploy Step, Test & Coverage step All these three would have their own extension points in respective classes (PluginBuildStep, PluginDeployStep, PluginTestStep) and a common class PluginMain which has all the common properties and the global.jelly

I tried doing this, but i see 3 repititions of global.jelly sections on the global configurations section.. Any pointers on how this can be done ? or am i on the wrong track (ie. each build step should have its own configuration and should not be sharing configuration with other build steps..?)

War es hilfreich?

Lösung

Managed to resolve this by using Job Properties as explained here... Can two different jenkins builders exist in the same hpi and share the same global configuration?

Andere Tipps

You might have a look at the inheritance-plugin:

https://wiki.jenkins-ci.org/display/JENKINS/inheritance-plugin

This youtube video talks about inheriting build steps (at time 7m 20s):

http://youtu.be/DNUI7DRi6XE?t=7m20s

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top