Skip to content

Commit

Permalink
Get jobname from run if we don't have a github config (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
jxpearce-godaddy committed Sep 4, 2018
1 parent e208244 commit 29820bf
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -51,6 +51,7 @@
import org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode;
import org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode;
import org.jenkinsci.plugins.workflow.flow.FlowExecution;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;

/**
*
Expand Down Expand Up @@ -247,6 +248,11 @@ private static void checkEnableBuildStatus(FlowNode flowNode) {
repoOwner = githubConfig.getRepoOwner();
repoName = githubConfig.getRepoName();
branchName = githubConfig.getBranchName();
} else {
if (run instanceof WorkflowRun) {
repoName = run.getParent().getDisplayName();
repoOwner = run.getParent().getParent().getFullName();
}
}
buildStatusAction.addInfluxDbNotifier(
InfluxDbNotifierConfig.fromGlobalConfig(repoOwner, repoName, branchName));
Expand Down

0 comments on commit 29820bf

Please sign in to comment.