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.

          [JENKINS-28131] Pass NODE_NAME into node{}

          Anshu Arya created issue -
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-27145 [ JENKINS-27145 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-28182 [ JENKINS-28182 ]
          Jesse Glick made changes -
          Description Original: 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 {}.
          New: 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}}.
          Manuel Recena Soto made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Manuel Recena Soto [ recena ]
          Manuel Recena Soto made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Manuel Recena Soto made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Manuel Recena Soto made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-31391 [ JENKINS-31391 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 162845 ] New: JNJira + In-Review [ 197052 ]

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

              Created:
              Updated:
              Resolved: