Reputation: 884
I'm running a Jenkins job on a GitHub project (Project A)
, as part of this job I want to checkout another different GitHub project (Project B)
using shell script command
Upvotes: 0
Views: 842
Reputation: 529
If you really want to use a shell command for that you could go for
$ git clone https://<YOUR_REPOSITORY_URL>
.
However, if you are using a Jenkins pipeline job you might consider using following command in your Jenkinsfile:
stage('Checkout') {
git branch: '<BRANCH_NAME>', credentialsId: '<JENKINS_CREDENTIAL_ID>', url: 'git@<URL_OF_REPOSITORY>'
}
Upvotes: 2