I have two branches on BitBucket: master
and develop
. I\'ve also got a BitBucket Team Folder job configured on my Jenkins server to build that reposito
You can use the intrinsic function in Jenkins Pipeline created for Git cloning and pulling. I would also suggest cloning the branches into separate directories.
checkout([$class: 'GitSCM',
branches: [[name: '*/branch_name']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory',
relativeTargetDir: 'different_directory']],
submoduleCfg: [],
userRemoteConfigs: [[url: 'git@github.domain:org/repo.git']]])