public class MyNodeAssignmentAction extends Object implements hudson.model.labels.LabelAssignmentAction
| Modifier and Type | Field and Description |
|---|---|
static String |
DISPLAY_NAME |
protected static Logger |
logger |
| Constructor and Description |
|---|
MyNodeAssignmentAction() |
| Modifier and Type | Method and Description |
|---|---|
hudson.model.Label |
getAssignedLabel(hudson.model.queue.SubTask task)
This method checks if the plugin is enabled then finds the node of the parent job.
|
String |
getDisplayName() |
String |
getIconFileName() |
protected String |
getNodeJobLastRan(hudson.model.AbstractProject project,
hudson.model.Label defaultLabel)
This method sets node if it is an empty string, if node is currently null, it sets node to master.
|
protected NodeStalkerBuildWrapper |
getNodeStalkerBuildWrapper(hudson.model.BuildableItemWithBuildWrappers project)
This method checks current jobs configuration to see if NodeStalkerPlugin is enabled.
|
String |
getUrlName() |
protected void |
updateWorkspace(hudson.model.AbstractProject followedProject,
hudson.model.AbstractProject project)
Overriding the Custom Workspace field of our job to follow the workspace of the parent job
|
protected static final Logger logger
public static final String DISPLAY_NAME
public hudson.model.Label getAssignedLabel(hudson.model.queue.SubTask task)
getAssignedLabel in interface hudson.model.labels.LabelAssignmentActiontask - The current build of our jobprotected void updateWorkspace(hudson.model.AbstractProject followedProject,
hudson.model.AbstractProject project)
followedProject - the project specified in the UIproject - The project that is currently buildingprotected NodeStalkerBuildWrapper getNodeStalkerBuildWrapper(hudson.model.BuildableItemWithBuildWrappers project)
project - the job that is currently runningpublic String getIconFileName()
getIconFileName in interface hudson.model.Actionpublic String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getUrlName()
getUrlName in interface hudson.model.Actionprotected String getNodeJobLastRan(hudson.model.AbstractProject project, hudson.model.Label defaultLabel)
project - job that we want to followdefaultLabel - label that Jenkins would assign without Node Stalker pluginCopyright © 2004-2015. All Rights Reserved.