Skip to content

Commit

Permalink
check for disabled build for older jobs
Browse files Browse the repository at this point in the history
looks like pipeline jobs don't have a disable option
  • Loading branch information
gazal-k authored and Frode Aannevik committed Feb 19, 2017
1 parent 7253118 commit 066fc63
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,13 @@ private Map<String, ParameterValue> getDefaultParameters() {

@Override
public void run() {
logger.log(Level.INFO, "TODO: check if project is disabled before calling bitbucketPullRequestsBuilder.run()");
this.bitbucketPullRequestsBuilder.run();
this.getDescriptor().save();
Job<?,?> project = this.getBuilder().getProject();
if (project instanceof AbstractProject && ((AbstractProject)project).isDisabled()) {
logger.info("Build Skip.");
} else {
this.bitbucketPullRequestsBuilder.run();
this.getDescriptor().save();
}
}

@Override
Expand Down

0 comments on commit 066fc63

Please sign in to comment.