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

Make the name of the node that trigger the startup job available

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I’m working on a slave reboot task that would take a node offline, wait for any running jobs to complete and then restart the computer. Once restarted and reconnected I need to bring the node back online which is where I’d like to have a job that is triggered by a node startup (using this plugin) and will run a groovy script via the "Execute Groovy Script" build step:

      jenkins = Hudson.instance
      def node = jenkins.nodes.getNode("node name").getComputer()
      if (node.isTemporarilyOffline())

      { node.setTemporarilyOffline(false, node.getOfflineCause()) }

      The two issues I have are:
      1. The plugin does not appear to provide the name of the node that triggered the job – a solution would be for the plugin to provide an environment variable that I could read within the groovy script.

      2. The "Restricted node Label" to does not support wild cards – it would be nice if there was some way I could say “run this for all nodes”, possibly by putting a * in the node label field although a work around for this would be to give all nodes a label of ONLINE which would give the desired result as long as it doesn’t break the existing label the slaves have

      The first issue is definitely the most desired, the second nice to have.

        Attachments

          Activity

          andrewsumner Andrew Sumner created issue -
          rtyler R. Tyler Croy made changes -
          Field Original Value New Value
          Workflow JNJira [ 154523 ] JNJira + In-Review [ 178826 ]
          ejpenney Emory Penney made changes -
          Assignee ashlux [ ashlux ] Emory Penney [ ejpenney ]
          ejpenney Emory Penney made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          ejpenney Emory Penney made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              ejpenney Emory Penney
              Reporter:
              andrewsumner Andrew Sumner
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: