Skip to content
Browse files

Merge pull request #18 from jenkinsci/workflow-support

[FIXED JENKINS-27225] Support the Workflow plugin
  • Loading branch information
batmat committed Oct 9, 2015
2 parents e4e4c98 + f06d1e1 commit f8a6355f8e96391674aad71f82dc1eb702ada1b2
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/main/java/org/jenkinsci/plugins/buildtriggerbadge/
@@ -1,34 +1,33 @@
package org.jenkinsci.plugins.buildtriggerbadge;

import hudson.Extension;
import hudson.model.TaskListener;
import hudson.model.AbstractBuild;
import hudson.model.Cause;
import hudson.model.listeners.RunListener;

import java.util.List;

import jenkins.model.Jenkins;

import org.jenkinsci.plugins.buildtriggerbadge.provider.BuildTriggerBadgeDeactivator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import hudson.Extension;
import hudson.model.Cause;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.listeners.RunListener;
import jenkins.model.Jenkins;

* Listener to all build to add the badge action.
* @author Michael Pailloncy
public class RunListenerImpl extends RunListener<AbstractBuild> {
public class RunListenerImpl extends RunListener<Run> {
private static final Logger LOGGER = LoggerFactory.getLogger(RunListenerImpl.class);

public RunListenerImpl() {

public void onStarted(AbstractBuild build, TaskListener listener) {
public void onStarted(Run build, TaskListener listener) {
BuildTriggerBadgePlugin plugin = Jenkins.getInstance().getPlugin(BuildTriggerBadgePlugin.class);
if (plugin.isActivated()) {
List<Cause> causes = CauseFilter.filter((List<Cause>) build.getCauses());

0 comments on commit f8a6355

Please sign in to comment.