Hi Craig,

I noticed that the deleteDir() feature has not been released yet. It should
appear in workflow-1.11. Can be temporarily replaced by a script invocation
via "sh".

Thanks a lot for your feedback regarding the documentation. As you probably
see, it's being reworked now. I'll forward your proposal to Esther
<https://github.com/estheryouhana>, who works on the docs now. BTW, also
feel free to contribute :)

Best regards,
Oleg Nenashev

2015-09-29 23:51 GMT+03:00 Craig Rodrigues <rodr...@freebsd.org>:

> Hi,
>
> Thanks for the example.  I see that deleteDir() is referenced here:
>
>
> https://github.com/jenkinsci/workflow-plugin/blob/master/aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/DeleteDirStepTest.java
>
> https://github.com/jenkinsci/workflow-plugin/blob/master/basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/DeleteDirStep/help.html
>
> It might be worth it to take the deleteDir() example from
> DeleteDirStepTest.java and put it in help.html,
> since the help.html is rather sparse.
>
> I would recommend as new functions are added to the workflow plugin which
> can
> be called from a workflow script, that they be
> documented in TUTORIAL.md as well.
>
> --
> Craig
>
>
> On Mon, Sep 28, 2015 at 12:59 PM, Oleg Nenashev <o.v.nenas...@gmail.com>
> wrote:
>
>> If you specify a boolean parameter, the Workflow code would be...
>>
>> node {
>>    if (clean_dir) {
>>        deleteDir()
>>    }
>>    ...
>>    // Further logic
>> }
>>
>> четверг, 10 сентября 2015 г., 21:59:06 UTC+3 пользователь Craig Rodrigues
>> написал:
>>
>>> Hi,
>>>
>>> James Nord recently fixed:
>>> "add a cross platform step that will delete all files in the current
>>> directory."
>>>  https://issues.jenkins-ci.org/browse/JENKINS-30346
>>>
>>> This does not address:
>>>
>>> 'workflow plugin: no opton to "Wipe Out Current Workspace"'
>>> https://issues.jenkins-ci.org/browse/JENKINS-28382
>>>
>>> However, it is a step in the right direction.
>>>
>>> Can I use a parameterized build, along with this new change to
>>> workflow-plugin to do the following:
>>>
>>> (1) I have a workflow.
>>> (2) With the workflow, I have a build parameter, "do_clean" which by
>>> default is set to 0.
>>> (3) If "do_clean" is set to 1, then logic in the workflow will be
>>> triggered which cleans out the files,
>>> otherwise if "do_clean" is set to 0, then no cleaning occurs.
>>>
>>> If this is possible, could someone post a code snippet of a workflow
>>> which does this?
>>>
>>> Thanks.
>>> --
>>> Craig
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPfivLAZr4eNLEh7fLBC%2BNPX9VxX65N5WJ73%2B9EuaRLpoqVMOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to