I have a Jenkins pipeline with parallel stages, which looks something like this:
/ -- build -- test-xyz -- test-123--
-- workspace--/ |--- Analyse -- upload results
-- build -- test-abc -- test-456 --/
Parallel stages run on separate node and will consume workspace like w1,w1@1,w1@2,w1@3. I want to delete all of these before starting a new build. I have tried the usage of cleanWs() but we need those workspace till next build. That’s why i am looking for some option to clean workspaces just before the new build.
Any suggestions would be highly appreciated?
Expecting a solution to clean all workspaces like w1, w1@1,w1@2 etc., before starting a new build.