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

Jenkinsfile lightweight checkout help doesn't match behaviour - polling and changelog work without checkout scm

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • subversion-plugin

      Hi, I'm using the new Lightweight checkout feature in the SVN plugin to retrieve a Jenkinsfile.  The checkout works correctly and I can see on my Jenkins master it's no longer doing a full checkout.

      The help for the 'lightweight checkout' feature states the following:

      "If selected, try to obtain the Pipeline script contents directly from the SCM without performing a full checkout. The advantage of this mode is its efficiency; however, you will not get any changelogs or polling based on the SCM. (If you use checkout scm during the build, this will populate the changelog and initialize polling.) Also build parameters will not be substituted into SCM configuration in this mode. Only selected SCM plugins support this mode."

      I don't have a checkout scm step in my Jenkinsfile, however the polling and changelog both appear to be working correctly (which doesn't match the help above). 

       Does the help documentation need updating?

      I'm also not clear on how/why I get a get a full checkout in my build steps without an explicit  checkout scm step when using the lightweight checkout e.g.

      pipeline

      {      agent \{ label "pipeline" }

           stages {
               stage("Stage1") {
                   steps

      {                  echo "running stage1 on $NODE_NAME"              }

              }
           }
      }

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

      All of the documentation seems to show a checkout scm step when Jenkins is configured to get the pipeline script from SCM.  Why am I getting a checkout without this, and is there a way to prevent it i.e. just checkout the Jenkinsfile?

       If this isn't an appropriate place to ask these questions please advise where I should raise this.  Thanks, Rich.

            Unassigned Unassigned
            richardm Richard Murray
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: