Reputation: 739
So when using a Jenkins pipeline I need to checkout a second git repository in a new folder:
dir('platform') {
println("\n\n\n=== === ===> gitBranch ${gitbranch} ");
dir('platform') {
deleteDir()
}
git url: '[email protected]', credentialsId: '1234567890', branch: 'feature/Packer-server-image-builds' // clones repo to subdir
}
When I try to use a variable to set the branch the command fails:
git url: '[email protected]', credentialsId: '1234567890', branch: '${gitbranch}'
What do I need to do to get this working?
Upvotes: 2
Views: 54