Request for more details on Build Wrapper stage in Workflow

67 views
Skip to first unread message

Vinodhini Vijay

unread,
Aug 19, 2015, 7:37:00 AM8/19/15
to Jenkins Developers

Hello All,

I had made a build wrapper that is Workflow compatible.

How will the Build Wrappers/Build Environment be displayed in the Free Style Project, gets displayed in the "Snippet Generator" of Workflow plugin?

I couldn't find the "General Build Wrapper/ General Build Environment" in the Jenkins > New Item > Workflow> Snippet Generator.

Could somebody help me please?

Thank you in advance!


Jesse Glick

unread,
Aug 19, 2015, 11:25:15 AM8/19/15
to Jenkins Dev
On Wed, Aug 19, 2015 at 7:37 AM, Vinodhini Vijay
<vinodhi...@gmail.com> wrote:
> I had made a build wrapper that is Workflow compatible.

So, `extends SimpleBuildWrapper`?

> I couldn't find the "General Build Wrapper/ General Build Environment" in
> the Jenkins > New Item > Workflow> Snippet Generator.

Assuming you are using Workflow 1.8 or later (which requires Jenkins
1.609.x or later), _General Build Wrapper_ should appear as an option
in _Snippet Generator_, and if your plugin is installed, it should be
listed as one of the available wrappers there.

Vinodhini Vijay

unread,
Aug 20, 2015, 5:21:37 AM8/20/15
to Jenkins Developers

Thank you!

Yes, my class extends SimpleBuildWrapper.

I was using, older Jenkins LTS , later upgraded to Jenkins LTS 1.609.2. At this time, Workflow was not updated. It was using old version 1.4.2 . I just now upgraded Workflow plugin to 1.9 version. I could see "General Build Wrapper".

But the problem is, my build wrapper plugin is not listed in the Build Wrapper drop down list. Not sure whats the issue?

Thanks!






Jesse Glick

unread,
Aug 20, 2015, 10:34:33 AM8/20/15
to Jenkins Dev
On Thu, Aug 20, 2015 at 5:21 AM, Vinodhini Vijay
<vinodhi...@gmail.com> wrote:
> I just now upgraded Workflow plugin to 1.9 version. I could see "General Build Wrapper".

Progress…

> But the problem is, my build wrapper plugin is not listed in the Build
> Wrapper drop down list. Not sure whats the issue?

Not sure either. Do you have a `BuildWrapperDescriptor` registered
with `@Extension`, as

https://github.com/jenkinsci/workflow-plugin/blob/28c9600d1c623779b62e2e46e187671671501a21/basic-steps/src/main/java/org/jenkinsci/plugins/workflow/steps/CoreWrapperStep.java#L141-L149

expects? Did you `mvn clean hpi:run`? From `/script` try

println(ExtensionList.lookup(BuildWrapperDescriptor));
println(Jenkins.instance.getDescriptorByType(org.jenkinsci.plugins.workflow.steps.CoreWrapperStep.DescriptorImpl).applicableDescriptors);

Vinodhini Vijay

unread,
Aug 21, 2015, 4:33:02 AM8/21/15
to Jenkins Developers


On Thursday, 20 August 2015 20:04:33 UTC+5:30, Jesse Glick wrote:
On Thu, Aug 20, 2015 at 5:21 AM, Vinodhini Vijay
<vinodhi...@gmail.com> wrote:
> I just now upgraded Workflow plugin to 1.9 version. I could see "General Build Wrapper".

Progress…

> But the problem is, my build wrapper plugin is not listed in the Build
> Wrapper drop down list. Not sure whats the issue?

Not sure either. Do you have a `BuildWrapperDescriptor` registered
with `@Extension`, as

https://github.com/jenkinsci/workflow-plugin/blob/28c9600d1c623779b62e2e46e187671671501a21/basic-steps/src/main/java/org/jenkinsci/plugins/workflow/steps/CoreWrapperStep.java#L141-L149

expects?

This worked!! .. I was using Descriptor<BuildWrapper> instead of BuildWrapperDescriptor. I had https://github.com/jenkinsci/pre-scm-buildstep-plugin/blob/master/src/main/java/org/jenkinsci/plugins/preSCMbuildstep/PreSCMBuildStepsWrapper.java as reference.

Thank you!
 
Did you `mvn clean hpi:run`? From `/script` try

println(ExtensionList.lookup(BuildWrapperDescriptor));
println(Jenkins.instance.getDescriptorByType(org.jenkinsci.plugins.workflow.steps.CoreWrapperStep.DescriptorImpl).applicableDescriptors);

Reply all
Reply to author
Forward
0 new messages