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/30e8cf50-4d1f-43f8-b9dd-97b531ce0d3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to