I have defined a simple Jenkins pipeline using the Groovy DSL. My intention is that it will simply checkout my git repository. However I am getting an error.
Given my groovy DSL defintion:
git branch: '*/mybranch', credentialsId: 'my credentials', url: 'email@example.com:pathto/myrepo.git'
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
The more verbose version works:
checkout([$class: 'GitSCM', branches: [[name: '*/mybranch']], doGenerateSubmoduleConfigurations: false, extensions: , submoduleCfg: , userRemoteConfigs: [[credentialsId: 'myCredentials', url: 'firstname.lastname@example.org:pathto/myrepo.git']]])
However it would be nice to use the short-hand version.