|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.datalex.jenkins.plugins.nodestalker.wrapper.MyNodeAssignmentAction
public class MyNodeAssignmentAction
This is the main class of the plugin. This class checks whether the plugin is enabled, then takes in the node and workspace locations of the last build of the parent job (the job specified by the user). It then restricts the current job to run on that node and (if Share Workspace is enabled) workspace.
| Field Summary | |
|---|---|
static String |
DISPLAY_NAME
|
protected static Logger |
logger
|
| Constructor Summary | |
|---|---|
MyNodeAssignmentAction()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger logger
public static final String DISPLAY_NAME
| Constructor Detail |
|---|
public MyNodeAssignmentAction()
| Method Detail |
|---|
public hudson.model.Label getAssignedLabel(hudson.model.queue.SubTask task)
getAssignedLabel in interface hudson.model.labels.LabelAssignmentActiontask - The current build of our job
protected 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 running
public 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.Action
protected 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 plugin
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||