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

Github multibranch checkout

XMLWordPrintable

      Hi,

      I use github organisation plugin to build jobs inside my github orga.

      Now I ran into following problem:
      It seems that "checkout scm" does nothing for "non-master branches":

      it does not checkout the branch, the directory is stays empty. Only for the master branch it works.

      https://gist.github.com/Flow86/6b6570bc95c24d60fb06baec09103b7d

      the part of my jenkinsfile already failing is this:

      node('master') {
          stage name:"Checkout", concurrency:1
          checkout scm
          sh """set -x
                git submodule foreach "git reset --hard || true" || true
                git reset --hard || true
                git submodule update --init || true
             """
      
          stash includes: '**, .git/', excludes: 'ws/**', name: 'source', useDefaultExcludes: false
      
          sh "env"
      
          wspwd = pwd()
      }
      

            Unassigned Unassigned
            flow86 Florian Doersch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: