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

Console output should print build number when adding a build to the queue

      I'm using this plugin in two scenarios. In both I would like to get the build number at the time that the job is added to the build queue. The executed jobs are long running and I want to open up the console while they are running.

      When the job enters the queue, a build number is created. See screenshot.

      The two different running modes:

      • With "Block until the triggered projects finish their builds"
      • Without "Block until the triggered projects finish their builds"

      With "Block until the triggered projects finish their builds":
      Line 1: Waiting for the completion of Job name - long running tests
      Line 2: Job name - long running tests #1040 completed. Result was FAILURE
      Line 3: Finished: FAILURE

      Line 1 appears when the job enter the queue. Line 2 and 3 appears after the job has finished.

      Should be:
      Line 1: Waiting for the completion of Job name - long running tests #1040
      Line 2: Job name - long running tests #1040 completed. Result was FAILURE
      Line 3: Finished: FAILURE

      Without "Block until the triggered projects finish their builds"
      Line 1: Triggering projects: Job name - long running tests
      Line 2: Finished: SUCCESS

      Line 1 appears when the job enter the queue. Line 2 appears after the job has finished.

      Should be:
      Line 1: Triggering projects: Job name - long running tests #1040
      Line 2: Finished: SUCCESS

          [JENKINS-21829] Console output should print build number when adding a build to the queue

          Liam Reimers added a comment -

          I'd love to see this.

          Liam Reimers added a comment - I'd love to see this.

          Daniel Beck added a comment -

          When the job enters the queue, a build number is created. See screenshot.

          This is incorrect, as the build number can still change. It's just a best effort guess (that probably should be removed), and therefore should not be logged into the build log, because build logs cannot be updated as opposed to the builds list.

          Essentially the same information need JENKINS-12827, where I explain why it's not possible. See JENKINS-16827 for why guessing is a bad idea.

          Daniel Beck added a comment - When the job enters the queue, a build number is created. See screenshot. This is incorrect, as the build number can still change. It's just a best effort guess (that probably should be removed), and therefore should not be logged into the build log, because build logs cannot be updated as opposed to the builds list. Essentially the same information need JENKINS-12827 , where I explain why it's not possible. See JENKINS-16827 for why guessing is a bad idea.

          Liam Reimers added a comment -

          Could we add a new line when the build actually begins? For example:

          Waiting for the completion of Job-Name
          Job-Name #1234 started.
          Job-Name #1234 completed. Result was RESULT
          Finished: RESULT

          Liam Reimers added a comment - Could we add a new line when the build actually begins? For example: Waiting for the completion of Job-Name Job-Name #1234 started. Job-Name #1234 completed. Result was RESULT Finished: RESULT

            huybrechts huybrechts
            hnygard Hallvard Nygård
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: