Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Don't try to start disabled jobs. #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/main/groovy/com/entagen/jenkins/JenkinsApi.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ class JenkinsApi {
}

void startJob(ConcreteJob job) {
println "Starting job ${job.jobName}."
post('job/' + job.jobName + '/build')
String config = getJobConfig(job.jobName)
if (!config.contains("<disabled>true</disabled>")) {
println "Starting job ${job.jobName}."
post('job/' + job.jobName + '/build')
}
}

String configForMissingJob(ConcreteJob missingJob, List<TemplateJob> templateJobs) {
Expand Down