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

node() step shall try to reuse node from last run

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • durable-task-plugin
    • None
    • Jenkins 1.121.1
      Pipeline Nodes and Processes 2.19

      Currently when running a simple pipeline like:

      node ('label') {
          echo 'Hello World'
      } 

      Each time you start the job the node used for the node block will be chosen randomly amongst all nodes supplyimg the 'label' label.

      This is very unfortunately because the involves lot of unneccessary compiles and cost a lot of time. In addition to that overall it'll need more disk space.

      So far I could not find any related feature request or bug which would cover this request. I tried to hack a workaround using a global shared library but so far I think this is simply not possible to do a stable approach using a global shared library.

      Request is to:

      • Store labels which had been in use by the last successfull job run.
      • For a ne node block, search in the list of stored label to build agent mappings for the build agent which was used in the last run
      • Try to reuse that very build agent. If there's no free executor shall build on another machine matchine the required abel expression elase.
        *

          [JENKINS-52529] node() step shall try to reuse node from last run

          Joerg Schwaerzler created issue -
          Joerg Schwaerzler made changes -
          Summary Original: nude() step shall try to reuse node from last run New: node() step shall try to reuse node from last run
          Joerg Schwaerzler made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Joerg Schwaerzler made changes -
          Link New: This issue is duplicated by JENKINS-51100 [ JENKINS-51100 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-36547 [ JENKINS-36547 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            macdrega Joerg Schwaerzler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: