Parallel pipeline - use clean node for each run

34 views
Skip to first unread message

Bartlomiej Zielinski

unread,
Mar 7, 2017, 8:54:13 AM3/7/17
to Jenkins Users
Hi,
I'm creating pipeline which execute 10 parallel builds. My Jenkins instance has 2 executors. I stash sources first. Then unstash them at the beginning of each build. How to force Jenkins to use clean folder (node) for every run?
Currently it use 'JOBNAME' folder and 'JOBNAME@2' folder. Run which is started in 'JOBNAME@2' folder builds ok. But run which use "JOBNAME' folder fails during unstashing.
I found some similar problem here where the solution was to use:
node {
  ws
{
    unstash
'sources'
 
}
}
This solution doesn't work for me.

--
Bartłomiej Zieliński

James Nord

unread,
Mar 7, 2017, 1:38:28 PM3/7/17
to Jenkins Users

Bartlomiej Zielinski

unread,
Mar 10, 2017, 3:58:01 AM3/10/17
to Jenkins Users
deleteDir() step work for me

W dniu wtorek, 7 marca 2017 19:38:28 UTC+1 użytkownik James Nord napisał:
Check deleteDir() step

https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-deletedir-code-recursively-delete-the-current-directory-from-the-workspace

Reply all
Reply to author
Forward
0 new messages