Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55488

How to fetch the changelog specific to a repo when we have multiple SCM chcekout in Jenkinsfile

XMLWordPrintable

      Hi,

      In my Jenkinsfile, I've below configuration to checkout two SCM repos.

       

      stage('Multiple SCM checkuot'){

      checkout([$class: 'GitSCM', branches: [[name: '${SERVICE_REPO_BRANCH1}']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'GitHubCredentials', url: '${SERVICE_REPO_URL1}']]])

       

      checkout([$class: 'GitSCM', branches: [[name: '${SERVICE_REPO_BRANCH2}']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'GitHubCredentials', url: '${SERVICE_REPO_URL2}']]])

      }

       

      Now I am fetching the changeLog using below code snippet.

       

      currentBuild.changeSets

       

      The above method is giving me the change sets from both the repos but I want to fetch the changesets specific to one repo. Please suggest on this.

            Unassigned Unassigned
            rajeshhereforyou Raj G
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: