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

Multibranch pipelines should always show changes

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.60.3
      Pipeline Plugin 2.5
      Pipeline: Multibranch 2.16
      Git Plugin 3.5.1

      Given a Jenkinsfile of the form:

      node {
          sh "ls"
      }
      

      If I configure a multibranch pipeline pointing to a git repo with this Jenkinsfile, Jenkins does not show changes. I have to explicitly add a checkout step:

      node {
          checkout scm
          sh "ls"
      }
      

      If Jenkins cannot find changes, it cannot notify the committers that a build has failed. For example, CulpritsRecipientProvider in the email-ext ultimately calls WorkflowRun::getChangeSets. This returns an empty list, so Jenkins doesn't know who to email.

      Adding 'checkout scm' seems redundant, because Jenkins has found the Jenkinsfile from git already. In principle, Jenkins has the data it needs to work out the changes, as far as I can see.

          [JENKINS-46431] Multibranch pipelines should always show changes

          Wilfred Hughes created issue -
          Jesse Glick made changes -
          Labels Original: pipeline
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-38659 [ JENKINS-38659 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-48474 [ JENKINS-48474 ]

            Unassigned Unassigned
            wilfredh Wilfred Hughes
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: