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

Pass NODE_NAME into node{}

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It would be useful and natural to be able to use env.NODE_NAME inside a node.

      Currently. the following code results in null:

      node('myNode') { echo "My name is ${env.NODE_NAME}" }
      

      Perhaps ExecutorStepExecution should define NODE_NAME for use by steps inside node.

        Attachments

          Issue Links

            Activity

            anshuarya Anshu Arya created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is blocking JENKINS-27145 [ JENKINS-27145 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-28182 [ JENKINS-28182 ]
            jglick Jesse Glick made changes -
            Description It would be useful and natural to be able to use env.NODE_NAME inside a node{}.

            Currently. the following code results in null: node('myNode') { echo "My name is ${env.NODE_NAME}" }

            Perhaps ExecutorStepExecution should define NODE_NAME for use by steps inside node {}.
            It would be useful and natural to be able to use {{env.NODE_NAME}} inside a {{node}}.

            Currently. the following code results in null:

            {code}
            node('myNode') { echo "My name is ${env.NODE_NAME}" }
            {code}

            Perhaps {{ExecutorStepExecution}} should define {{NODE_NAME}} for use by steps inside {{node}}.
            recena Manuel Recena Soto made changes -
            Assignee Jesse Glick [ jglick ] Manuel Jesús Recena Soto [ recena ]
            recena Manuel Recena Soto made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            recena Manuel Recena Soto made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            recena Manuel Recena Soto made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-31391 [ JENKINS-31391 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 162845 ] JNJira + In-Review [ 197052 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]

              People

              Assignee:
              recena Manuel Recena Soto
              Reporter:
              anshuarya Anshu Arya
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: