summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/Phase.java5
-rw-r--r--src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/model/BuildState.java10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/Phase.java b/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/Phase.java
index e198f0f..fe36f65 100644
--- a/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/Phase.java
+++ b/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/Phase.java
@@ -24,6 +24,7 @@ import hudson.model.ParametersAction;
24import hudson.model.Run; 24import hudson.model.Run;
25import hudson.model.Executor; 25import hudson.model.Executor;
26import hudson.model.Computer; 26import hudson.model.Computer;
27import hudson.model.Node;
27import hudson.model.TaskListener; 28import hudson.model.TaskListener;
28import jenkins.model.Jenkins; 29import jenkins.model.Jenkins;
29 30
@@ -79,6 +80,10 @@ public enum Phase {
79 Computer computer = executor.getOwner(); 80 Computer computer = executor.getOwner();
80 if (computer != null) { 81 if (computer != null) {
81 buildState.setNodeName(computer.getName()); 82 buildState.setNodeName(computer.getName());
83 Node node = computer.getNode();
84 if (node != null) {
85 buildState.setNodeDescription(node.getNodeDescription());
86 }
82 } 87 }
83 } 88 }
84 89
diff --git a/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/model/BuildState.java b/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/model/BuildState.java
index 4253af0..4413a63 100644
--- a/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/model/BuildState.java
+++ b/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/model/BuildState.java
@@ -36,6 +36,8 @@ public class BuildState {
36 36
37 private String nodeName; 37 private String nodeName;
38 38
39 private String nodeDescription;
40
39 private String hostName; 41 private String hostName;
40 42
41 public int getNumber() { 43 public int getNumber() {
@@ -94,6 +96,14 @@ public class BuildState {
94 this.nodeName = nodeName; 96 this.nodeName = nodeName;
95 } 97 }
96 98
99 public String getNodeDescription() {
100 return nodeDescription;
101 }
102
103 public void setNodeDescription(String nodeDescription) {
104 this.nodeDescription = nodeDescription;
105 }
106
97 public String getHostName() { 107 public String getHostName() {
98 return hostName; 108 return hostName;
99 } 109 }