title: Trigger specific Jenkins job when multiple repos specified in jenkinsfile
body: <p>I created separate Jenkins jobs for each of the three github repositories (app1, app2, and app3).
  Then there's the deployment and test repositories.</p>
  <blockquote>
  <pre><code>app1 repo(with webhook enabled) =&gt; app1 JenkinsJob
  app2 repo(with webhook enabled) =&gt; app2 JenkinsJob
  app3 repo(with webhook enabled) =&gt; app3 JenkinsJob
  deployment repo(webhook NOT enabled)
  test repo(webhook NOT enabled)
  </code></pre>
  </blockquote>
  <p>Below is the jenkinsfile of app1.(Only GIT_REPO_URL1 differs for app2 &amp; app3).</p>
  <pre><code>pipeline {
      environment {
          GIT_REPO_URL1 = 'https://github.com/app1.git'
          GIT_REPO_URL2 = 'https://github.com/deployment.git'
          GIT_REPO_URL3 = 'https://github.com/test.git'
          GIT_REPO_AUTH_CRED = 'abcdefg-123123-321123-qwead-asdqwe123'
      }   agent any
      stages {
          stage('GitClone1') {
              steps {
                  checkout([$class: 'GitSCM', branches: [[name: 'refs/heads/master']], extensions: [[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: false, reference: '', trackingSubmodules: false]], userRemoteConfigs: [[credentialsId: &quot;${GIT_REPO_AUTH_CRED}&quot;, url: &quot;${GIT_REPO_URL1}&quot;]]])
                  echo '========++++++++ GitClone Completed ========++++++++'
              }
          }
          stage('GitClone2') {
              steps {
                  checkout([$class: 'GitSCM', branches: [[name: 'refs/heads/master']], extensions: [[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: false, reference: '', trackingSubmodules: false]], userRemoteConfigs: [[credentialsId: &quot;${GIT_REPO_AUTH_CRED}&quot;, url: &quot;${GIT_REPO_URL2}&quot;]]])
                  echo '========++++++++ GitClone Completed ========++++++++'
              }
          }
          stage('GitClone3') {
              steps {
                  checkout([$class: 'GitSCM', branches: [[name: 'refs/heads/master']], extensions: [[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: false, reference: '', trackingSubmodules: false]], userRemoteConfigs: [[credentialsId: &quot;${GIT_REPO_AUTH_CRED}&quot;, url: &quot;${GIT_REPO_URL3}&quot;]]])
                  echo '========++++++++ GitClone Completed ========++++++++'
              }
          }
      } }
  </code></pre>
  <p>Code delivery on app1/app2/app3 is triggering app1/app2/app3 jenkins jobs respectively.</p>
  <p><strong>Now issue is,</strong> when i push a code change to <a href="https://github.com/deployment.git" rel="nofollow noreferrer">https://github.com/deployment.git</a> or <a href="https://github.com/test.git" rel="nofollow noreferrer">https://github.com/test.git</a> repositories, Jenkins pipelines for app1, app2, and app3 are automatically triggered.</p>
  <p>Expected Fix:
  The app jenkins job should be triggered by only code delivery to the app repos.</p>