How to make a BatchFile Workflow Compatible?

34 views
Skip to first unread message

Vinodhini Vijay

unread,
Sep 2, 2015, 3:15:44 AM9/2/15
to Jenkins Developers
Hello All,

We create objects of  BatchFile and use. But this is not Workflow Compatible ( got to know from the signature of method "perform").

Is there any workflow compatible version of BatchFile already available?

Thank you!


Robert Sandell

unread,
Sep 2, 2015, 11:47:32 AM9/2/15
to jenkin...@googlegroups.com
node {
    bat 'echo hello windows'
}


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/86912cc8-b2d9-4a30-bfa8-5e55c87b6362%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Vinodhini Vijay

unread,
Sep 3, 2015, 1:16:28 AM9/3/15
to Jenkins Developers
Thank you!

So, the corresponding class file is WindowsBatchScript from package org.jenkinsci.plugins.durabletask;?

Can I use WindowsBatchScript batch = new WindowsBatchScript("echo hello windows"); within my code? Is there any points to be noted, if I use this way ?

Sorry if it is really silly question. (I am very much interested in learning this and understanding this more :) )

Thank you!

Robert Sandell

unread,
Sep 3, 2015, 11:11:41 AM9/3/15
to jenkin...@googlegroups.com
I don't fully understand what you are trying to do. The steps should only be instantiated within the context of a workflow. If you are implementing you own workflow steps there is some documentation on doing that here: https://github.com/jenkinsci/workflow-plugin/blob/master/step-api/README.md probably mimicking DurableTaskStep and using a Launcher like it does.


For more options, visit https://groups.google.com/d/optout.

Jesse Glick

unread,
Sep 4, 2015, 6:59:29 AM9/4/15
to Jenkins Dev
On Wed, Sep 2, 2015 at 10:16 PM, Vinodhini Vijay
<vinodhi...@gmail.com> wrote:
> Can I use WindowsBatchScript batch = new WindowsBatchScript("echo hello
> windows"); within my code?

You probably do not want to do that.

What are you trying to accomplish? Start there. Are you writing a
plugin? Why? What would it do? What led you to this question?
Reply all
Reply to author
Forward
0 new messages