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

Declarative SCM checkout not running on certain branches

XMLWordPrintable

      I am running a Multibranch Pipeline with the Bitbucket branch source plugin (my configuration is in the screenshot below).  When creating a Pull Request in Bitbucket against the 'qa' branch the Declarative SCM Checkout stage does not do anything:

       

      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Declarative: Checkout SCM)
      [Pipeline] checkout
      [Pipeline] }
      

      When creating a Pull Request in Bitbucket against the 'uat' branch or the 'master' branch the pipeline everything checkouts out fine:

       

      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Declarative: Checkout SCM)
      [Pipeline] checkoutusing credential jenkins-bitbucket
      Cloning the remote Git repository
      Cloning with configured refspecs honoured and without tagsCloning repository https://bitbucket.org/myproject/myrepo.git
       > git init /home/jenkins/workspace/myrepo_PR-24 # timeout=10
      Fetching upstream changes from https://bitbucket.org/myproject/myrepo.git
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials Jenkins credentials for bitbucket cloud
       > git fetch --no-tags --progress https://bitbucket.org/myproject/myrepo.git +refs/heads/jenkins:refs/remotes/origin/PR-24
       > git config remote.origin.url https://bitbucket.org/myproject/myrepo.git # timeout=10
      Fetching without tagsChecking out Revision dbf6c37eb9db62d794720bdddf3cfc740f0d5c0e (PR-24)
       > git config --add remote.origin.fetch +refs/heads/jenkins:refs/remotes/origin/PR-24 # timeout=10
       > git config remote.origin.url https://bitbucket.org/myproject/myrepo.git # timeout=10
      Fetching upstream changes from https://bitbucket.org/myproject/myrepo.git
      using GIT_ASKPASS to set credentials Jenkins credentials for bitbucket cloud
       > git fetch --no-tags --progress https://bitbucket.org/myproject/myrepo.git +refs/heads/jenkins:refs/remotes/origin/PR-24
       > git config core.sparsecheckout # timeout=10
       > git checkout -f dbf6c37eb9db62d794720bdddf3cfc740f0d5c0eCommit message: "Jenkinsfile for multibranch pipeline"
      First time build. Skipping changelog.
      [Pipeline] }
      

      Is there any way I can get verbose logging on the Declarative SCM Checkout stage? I have tried recreating the pipeline from scratch with no luck.  I've also reset my 'qa' branch to my 'uat' branch in case there was any branch corruption.

      I am running Jenkins on Kubernetes using the Kubernetes plugin to spin up agents where these jobs are run.

            markewaite Mark Waite
            tball33 Travis Ball
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: