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

Add option to Fail the build if node label does not exist or if it cannot be provisioned within a timeout

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • plugin-proposals
    • None
    • Jenkins 1.642
      github-branch-source-plugin:1.7
      github-organization-folder-plugin:1.3

      Issue

      When a node label does not exists, the build hangs in the queue until a node is assigned to that label. In that case I would like my build to fail. It would be great to have such option and also the possibility to apply it with GitHub Organization.

      How to Reproduce

      node ('thislabeldoesnotexists') {
          echo "This could be improved"
      }
      

      This label does not exists in my Instance, the build hang in the queue and the console logs show:

      > There are no nodes with the label ‘thislabeldoesnotexists’

          [JENKINS-35905] Add option to Fail the build if node label does not exist or if it cannot be provisioned within a timeout

          Allan BURDAJEWICZ created issue -

          Be careful that nodes might be provisioned dynamically (e.g. from AWS or OpenStack) and it takes few minutes to appear in label (if not already started).

          Pavol Pitoňák added a comment - Be careful that nodes might be provisioned dynamically (e.g. from AWS or OpenStack) and it takes few minutes to appear in label (if not already started).

          Jesse Glick added a comment -

          Right, in some cases an agent with that label will be attached later. It is also common for the existence of a queue item to spur a Cloud to provision an agent with a matching label.

          Jesse Glick added a comment - Right, in some cases an agent with that label will be attached later. It is also common for the existence of a queue item to spur a Cloud to provision an agent with a matching label.
          Jesse Glick made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 172525 ] New: JNJira + In-Review [ 199274 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Oleg Nenashev made changes -
          Summary Original: Fail the build if node label does not exist. New: Add option to Fail the build if node label does not exist or if it cannot be provisioned within a timeout
          Oleg Nenashev made changes -
          Issue Type Original: Improvement [ 4 ] New: New Feature [ 2 ]

          Oleg Nenashev added a comment -

          I think this issues is a valid improvement request. The default behavior of node() cannot be changed of course, but it may be potentially doable via additional Pipeline closures or additional node closure parameters

          Oleg Nenashev added a comment - I think this issues is a valid improvement request. The default behavior of node() cannot be changed of course, but it may be potentially doable via additional Pipeline closures or additional node closure parameters
          Oleg Nenashev made changes -
          Assignee Original: Jesse Glick [ jglick ]
          Resolution Original: Won't Fix [ 2 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            15 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: