Hi all,
How should I clean the checkout directory using GenericSCM step of workflow-plugin?
The snippet generator generates the line like the following:
checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], extensions: [<object of type hudson.plugins.git.extensions.impl.CleanCheckout>], userRemoteConfigs: [[credentialsId: '4db1f14a-c479-48af-a3ea-da676bc2b051', url: '
https://github.com/XXXXXX/XXXXXXXXXX.git']]]
It looks like the [<object of type hudson.plugins.git.extensions.impl.CleanCheckout>] is not the correct Groovy syntax here (so says Jenkins).
I've tried passing the following ways of specifying extensions but none of them worked:
extensions: [hudson.plugins.git.extensions.impl.CleanCheckout()]
extensions: [CleanCheckout()] // + at the very top of the script "import hudson.plugins.git.extensions.impl.CleanCheckout"
extensions: [$class: 'CleanCheckout']
extensions: [[$class: 'CleanCheckout']]
Any ideas how this should be done?
Thanks,
Timur