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

skipDefaultCheckout() : pipeline displays "No change"

    XMLWordPrintable

Details

    Description

      scope: declarative pipeline + bitbucket multi branch

      for optimization purpose (big repo), i chose to skip the default checkout.

              options {
                  disableConcurrentBuilds()
                  skipDefaultCheckout(env.PR_NUM != null)
              }

      i also implemented my own checkout, depending on branch's type (feature, PR-,...)

      pipeline triggers jobs on every commit i do, but somehow the "changes" are not caught

      when i do NOT skip the default checkout, everything works as expected.

      Question: is this as "per-design", how can i get rid of this issue?

       

      Attachments

        Issue Links

          Activity

            vivek Vivek Pandey added a comment - - edited

            kgiloo Did this start failing since bitbucket-branch-source 2.2.7? Do you see it working with 2.2.3? M making sure it was not a regression caused due to light weight checkout feature added in 2.2.7.

            vivek Vivek Pandey added a comment - - edited kgiloo Did this start failing since bitbucket-branch-source 2.2.7? Do you see it working with 2.2.3? M making sure it was not a regression caused due to light weight checkout feature added in 2.2.7.
            kgiloo kgiloo added a comment -

            vivek YES indeed: with version 2.2.3 pipeline shows the changes as expected.

            kgiloo kgiloo added a comment - vivek YES indeed: with version 2.2.3 pipeline shows the changes as expected.
            kgiloo kgiloo added a comment -

            vivek Any chance to have this fixed in a near future?

            kgiloo kgiloo added a comment - vivek Any chance to have this fixed in a near future?
            kgiloo kgiloo added a comment -

            vivek Please can you update me on this bug?  it has occurred since version 2.2.3

            kgiloo kgiloo added a comment - vivek Please can you update me on this bug?  it has occurred since version 2.2.3
            vivek Vivek Pandey added a comment -

            stephenconnolly abayer With lightweight checkout, full checkout doesn't happen, somehow its interfering with detecting changes with

            skipDefaultCheckout(env.PR_NUM != null)

            ?

            vivek Vivek Pandey added a comment - stephenconnolly abayer With lightweight checkout, full checkout doesn't happen, somehow its interfering with detecting changes with skipDefaultCheckout(env.PR_NUM != null ) ?
            abayer Andrew Bayer added a comment -

            Well, if you've got skipDefaultCheckout(true), there's no automatic checkout of the full repo happening on the agent, so that'd basically be the same as if you just had a Pipeline like

            echo "hi"
            

            So if you don't see changes with that Scripted Pipeline example either, then the problem is definitely that light checkouts aren't updating the changes. Then again, I'm not 100% sure that's a problem vs just how it's supposed to work... stephenconnolly would know best on that behavior, since it's branch source level, not Declarative level.

            abayer Andrew Bayer added a comment - Well, if you've got skipDefaultCheckout(true) , there's no automatic checkout of the full repo happening on the agent, so that'd basically be the same as if you just had a Pipeline like echo "hi" So if you don't see changes with that Scripted Pipeline example either, then the problem is definitely that light checkouts aren't updating the changes. Then again, I'm not 100% sure that's a problem vs just how it's supposed to work... stephenconnolly would know best on that behavior, since it's branch source level, not Declarative level.
            jglick Jesse Glick added a comment -

            Possibly dupe of JENKINS-46431.

            (Why would you implement your own checkout? checkout scm already handles every case.)

            jglick Jesse Glick added a comment - Possibly dupe of  JENKINS-46431 . (Why would you implement your own checkout? checkout scm already handles every case.)
            kgiloo kgiloo added a comment -

            jglick we need to extract the history from our workspace and as far as i know the 'checkout scm' per design does not handle the clone configuration... or am i wrong?

            kgiloo kgiloo added a comment - jglick we need to extract the history from our workspace and as far as i know the 'checkout scm' per design does not handle the clone configuration... or am i wrong?

            People

              kgiloo kgiloo
              kgiloo kgiloo
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: