Skip to content
Permalink
Browse files
Fix JENKINS-17975
  • Loading branch information
gboissinot committed May 16, 2013
1 parent 15222fd commit 6568c274b3758e8fea581602eb7b363ffd0d61ed
Showing 1 changed file with 8 additions and 4 deletions.
@@ -34,10 +34,14 @@ public void buildEnvironmentFor(Run r, EnvVars envs, TaskListener listener) thro

//Get local node pattern and override it if any
Node node = build.getBuiltOn();
for (NodeProperty<?> nodeProperty : node.getNodeProperties()) {
if (nodeProperty instanceof ZenTimestampNodeProperty) {
ZenTimestampNodeProperty envInjectNodeProperty = (ZenTimestampNodeProperty) nodeProperty;
pattern = envInjectNodeProperty.getPattern();
//Check if the node is already up
// --> Build can be a previous build (case of polling) and the node can be no more exists
if (node != null) {
for (NodeProperty<?> nodeProperty : node.getNodeProperties()) {
if (nodeProperty instanceof ZenTimestampNodeProperty) {
ZenTimestampNodeProperty envInjectNodeProperty = (ZenTimestampNodeProperty) nodeProperty;
pattern = envInjectNodeProperty.getPattern();
}
}
}

0 comments on commit 6568c27

Please sign in to comment.