title: Jenkins Pipeline: scm checkout shallow copy fails
body: <p>I am using Jenkins file to build a pipeline. I am trying to clone the reference repository using DSL like below.</p>
  
  <pre><code>checkout(
  [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, 
  extensions: [[$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]], 
  submoduleCfg: [], 
  userRemoteConfigs: [[url: 'git@bitbucket.org:user_team/infrastructure-as-code.git']])
  </code></pre>
  
  <p>and while the pipeline is being executed, it is being translated to this</p>
  
  <pre><code>git fetch --tags --progress git@bitbucket.org:userteam/infrastructure-as-code.git +refs/heads/*:refs/remotes/origin/* --depth=1
  </code></pre>
  
  <p>This clones the whole repository on my Jenkins server. I just want to obtain a shallow copy of my repo so that I could save my Jenkins server from space crunch. 
  Please help here.</p>
  
  <p>I am using:
  Jenkins version: 2.58,</p>
  
  <p><strong>Plugins:</strong></p>
  
  <p>Pipeline SCM Step: 2.4</p>
  
  <p>Git: 3.3.0</p>