Skip to content
Permalink
Browse files

Merge pull request #1 from lrobertson39/patch-1

JENKINS-22422 - Add node to build cause
  • Loading branch information...
ejpenney committed Sep 6, 2016
2 parents b5e9f07 + 922349e commit ce8a473306b6806b4cd439ca6c21facad558375c
@@ -76,7 +76,7 @@ private void processAndScheduleIfNeeded(TopLevelItem item, Computer c, TaskListe
HudsonStartupService startupService = new HudsonStartupService();
if (startupService.has2Schedule(startupTrigger, node)) {
listener.getLogger().print("[StartupTrigger] - Scheduling " + project.getName());
project.scheduleBuild(startupTrigger.getQuietPeriod(), new HudsonStartupCause());
project.scheduleBuild(startupTrigger.getQuietPeriod(), new HudsonStartupCause(node));
}
}

@@ -23,11 +23,18 @@
package org.jvnet.hudson.plugins.triggers.startup;

import hudson.model.Cause;
import hudson.model.Node;

public class HudsonStartupCause extends Cause {

private Node node;

public HudsonStartupCause(Node node) {
this.node = node;
}

@Override
public String getShortDescription() {
return "Started due to the start of a node.";
return "Started due to the start of the node " + node.getDisplayName();
}
}

0 comments on commit ce8a473

Please sign in to comment.
You can’t perform that action at this time.