Hi Timur,

I had a similar problem with cloning into another directory. If you look 
into the config.xml of a job where the GitSCM is used you see something 
like this:

  <scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <url>https://github.com/XXXXXX/XXXXXXXXXX.git'</url>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>*/master</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    *<extensions>*
*      <hudson.plugins.git.extensions.impl.CleanCheckout/>*
*    </extensions>*
  </scm>

the extension part must be 'translated' to:

extensions: [[$class: 'hudson.plugins.git.extensions.impl.CleanCheckout']]

So you command should be something like:

checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], 
extensions: extensions: [[$class: 
'hudson.plugins.git.extensions.impl.CleanCheckout']], userRemoteConfigs: 
[[credentialsId: '4db1f14a-c479-48af-a3ea-da676bc2b051', url: '
https://github.com/XXXXXX/XXXXXXXXXX.git'] 
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FXXXXXX%2FXXXXXXXXXX.git%27%255D&sa=D&sntz=1&usg=AFQjCNHfEpWmZiLl31HFf02Ge974L47MIg>
]]

Regards

Clifford

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/435e4c7e-43d1-4a2c-879f-f21ae25fa436%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to