Issue Type: Improvement Improvement
Affects Versions: current
Assignee: ashlux
Components: startup-trigger-plugin
Created: 30/Mar/14 10:44 PM
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.

Project: Jenkins
Priority: Major Major
Reporter: Andrew Sumner
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to