Skip to content

Commit

Permalink
Merge pull request #98 from anotherchrisberry/disabled-pipeline
Browse files Browse the repository at this point in the history
do not fire triggers if pipeline is disabled
  • Loading branch information
anotherchrisberry authored Aug 13, 2016
2 parents e23664f + 45d3a2c commit 7c40b0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
@JsonProperty
boolean parallel;

@JsonProperty
boolean disabled;

@JsonProperty
boolean limitConcurrent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected Action1<TriggerEvent> triggerEachMatchFrom(final List<Pipeline> pipeli
protected Func1<Pipeline, Optional<Pipeline>> withMatchingTrigger(final TriggerEvent event) {
val triggerPredicate = matchTriggerFor(event);
return pipeline -> {
if (pipeline.getTriggers() == null) {
if (pipeline.getTriggers() == null || pipeline.isDisabled()) {
return Optional.empty();
} else {
return pipeline.getTriggers()
Expand Down

0 comments on commit 7c40b0a

Please sign in to comment.