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

skipDefaultCheckout() : pipeline displays "No change"

    Details

    • Similar Issues:

      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

            Hide
            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.

            Show
            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.
            Hide
            kgiloo kgiloo added a comment -

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

            Show
            kgiloo kgiloo added a comment - Vivek Pandey YES indeed: with version 2.2.3 pipeline shows the changes as expected.
            Hide
            kgiloo kgiloo added a comment -

            Vivek Pandey Any chance to have this fixed in a near future?

            Show
            kgiloo kgiloo added a comment - Vivek Pandey Any chance to have this fixed in a near future?
            Hide
            kgiloo kgiloo added a comment -

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

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

            Stephen Connolly Andrew Bayer With lightweight checkout, full checkout doesn't happen, somehow its interfering with detecting changes with

            skipDefaultCheckout(env.PR_NUM != null)

            ?

            Show
            vivek Vivek Pandey added a comment - Stephen Connolly Andrew Bayer With lightweight checkout, full checkout doesn't happen, somehow its interfering with detecting changes with skipDefaultCheckout(env.PR_NUM != null ) ?
            Hide
            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... Stephen Connolly would know best on that behavior, since it's branch source level, not Declarative level.

            Show
            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... Stephen Connolly would know best on that behavior, since it's branch source level, not Declarative level.
            Hide
            jglick Jesse Glick added a comment -

            Possibly dupe of JENKINS-46431.

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

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

            Jesse Glick 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?

            Show
            kgiloo kgiloo added a comment - Jesse Glick 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

              • Assignee:
                kgiloo kgiloo
                Reporter:
                kgiloo kgiloo
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: