summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@linux.vnet.ibm.com>2016-04-04 09:52:50 -0700
committerJames E. Blair <jeblair@linux.vnet.ibm.com>2016-04-13 17:24:01 -0700
commit3ef6c4a112ed1f2bd4bf72884d3db505009e6520 (patch)
tree35f60bde8003debbd2c6ffae57ef9a9a4ca89667
parentdd56aff16a4fb3f555ae0eadbe0caf54475d9553 (diff)
Add node description to event dataHEAD0.0.5master
There may be interesting information in the node description. With Ia4fc671ecb60581be258346afc23125749ba8f15 we are adding nodepool metadata to the description field. Change-Id: I95f87d60959e428d888e77de48e9acca0e34b233
Notes
Notes (review): Code-Review+2: Joshua Hesketh <joshua.hesketh@rackspace.com> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 14 Apr 2016 16:24:46 +0000 Reviewed-on: https://review.openstack.org/301237 Project: openstack-infra/zmq-event-publisher Branch: refs/heads/master
-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 }