This snippet compiles correctly, but the pattern is not included in ws-cleanup's box in the job config GUI:
job.publishers { cleanWs { cleanWhenAborted(true) cleanWhenFailure(true) cleanWhenNotBuilt(true) cleanWhenSuccess(true) cleanWhenUnstable(true) deleteDirs(true) patterns: [ [ pattern: '.propsfile', type: 'EXCLUDE' ] ] } }
Thank you for the help!
Any update here? This is blocking work.
Thanks for the report! Have this syntax ever worked? Where did you get that?
The DSL generated on my instance suggests something like:
patterns { pattern { pattern(String value) type(String value) } }
Which I have not made to work either.
Ok, so I have tested this syntax is accepted by job DSL plugin:
publishers { cleanWs { cleanWhenAborted(true) cleanWhenFailure(true) cleanWhenNotBuilt(false) cleanWhenSuccess(true) cleanWhenUnstable(true) deleteDirs(true) notFailBuild(true) disableDeferredWipeout(true) patterns { pattern { type('EXCLUDE') pattern('.propsfile') } pattern { type('INCLUDE') pattern('.gitignore') } } } }
I am closing this as not a defect. Feel free to reopen in case there are some tools / docs that advise this syntax.