Skip to content

Commit

Permalink
fix(pipelines): improve error msg if running disabled pipeline (#1991)
Browse files Browse the repository at this point in the history
  • Loading branch information
asher committed Feb 15, 2018
1 parent 8990a8b commit a0d46d1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class StartPipelineTask implements Task {
throw new IllegalArgumentException("The referenced ${isStrategy ? 'custom strategy' : 'pipeline'} cannot be located (${pipelineId}")
}

if (pipelineConfig.getOrDefault("disabled", false)) {
throw new IllegalArgumentException("The referenced ${isStrategy ? 'custom strategy' : 'pipeline'} is disabled")
}

def parameters = stage.context.pipelineParameters ?: [:]

if (isStrategy) {
Expand Down

0 comments on commit a0d46d1

Please sign in to comment.