You should be able to do this without writing a new plugin: https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin /Domi
On 24.12.2012, at 04:33, Harish Kayarohanam <[email protected]> wrote: > In jenkins, we have a requirement like having the options that appear under > build step like (say) > > Execute Shell > Execute commands over ssh > Invoke Ant > To appear in the post build section. And it should do the same work as it did > under build section. > > I made all the options in build section appear in UI under post build section > by doingit.getbuilddescriptors in config.jelly of my plugin. And it appeared > in my jenkins UI under post build section as a hetero list. > > But the problem is I don't know how to make it work as a bost build step. > > For shell we did > > Shell s = new Shell(command); > s.perform(build, listener, launcher); > and it worked. > > If this is possible, then it may even be possible for all build section > items. Is there a direct way to do without doing as I did for 'Execute shell'? > > > > > > why we need this ? > > We want to create a plugin that would do a complete deployment against the > produce from each build or each job . This deployment may consist of running > shell commands, running ant commands (mostly at the remote place) or a war > deployment (for which we have written a plugin with cargo).Mostly the > deployment is a combination of all these . So we want to click the items in > the hetero list , so that they appear in that order and then the user will > fill the fields . So if this feature is available as a single plugin we can > attach it as a post build step for all the jobs and customize the deployment > for each job as needed. We need this deployment as a post build, and not as a > build step. As a number of steps involved here are in the build portion, we > are in search to find ways to bring those options here,instead of writing a > post build plugin for each. >
