Checkout repository based on Tag in the Jenkins Workflow plugin

Just found the answer myself by crawling through the issue list. Seems like they won't change it; https://issues.jenkins-ci.org/browse/JENKINS-27018

This is the suggested solution;

checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: src]], branches: [[name: 'refs/tags/3.6.1']]], poll: false

This works:

checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: repoURL, 
credentialsId: credential]], branches: [[name: tag-version]]],poll: false

Not This:

checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: repoURL], 
[credentialsId: credential]], branches: [[name: tag-version]]],poll: false

noTags: false does the trick.

checkout([$class: 'GitSCM', branches: [[name: githash ]],
     doGenerateSubmoduleConfigurations: false, 
     extensions: [[$class: 'CloneOption', 
     depth: 0, 
     noTags: false,