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

manager.setBuildNumber() does not seem to do anything

XMLWordPrintable

      Simple Jenkinsfile:

       

      if (manager.setBuildNumber(1)) {
        echo "Current build: ${manager.build.number}"
        manager.createSummary("gear2.gif").appendText("<h2>Testing</h2>", false)
      }
      

       

      Output:

      [Pipeline] echo
      Current build: 3
      [Pipeline] End of Pipeline

      3 is the current build number so this number changes on every build and the createSummary() is added to the current build instead of build number 1 (not what I expect).

      Expected behaviour is to see build number 1 being set and the summary being added to build number 1.

            wolfs Stefan Wolf
            gservat Gonzalo Servat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: