Move CLI into the open

This commit is contained in:
Matt Mitchell 2015-12-03 08:57:28 -08:00
parent 969413c7f1
commit c97c9cab92

View file

@ -18,6 +18,7 @@ def static getBuildJobName(def configuration, def os) {
} }
[true, false].each { isPR ->
['Debug', 'Release'].each { configuration -> ['Debug', 'Release'].each { configuration ->
osList.each { os -> osList.each { os ->
// Calculate names // Calculate names
@ -36,29 +37,7 @@ def static getBuildJobName(def configuration, def os) {
buildCommand = "./scripts/ci_build.sh ${lowerConfiguration}" buildCommand = "./scripts/ci_build.sh ${lowerConfiguration}"
} }
// Create the new job def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
def newCommitJob = job(Utilities.getFullJobName(project, jobName, false)) {
// Set the label.
label(machineLabelMap[os])
steps {
if (os == 'Windows_NT') {
// Batch
batchFile(buildCommand)
}
else {
// Shell
shell(buildCommand)
}
}
}
Utilities.addScm(newCommitJob, project)
Utilities.addStandardOptions(newCommitJob)
Utilities.addStandardNonPRParameters(newCommitJob)
Utilities.addGithubPushTrigger(newCommitJob)
def newPRJob = job(Utilities.getFullJobName(project, jobName, true)) {
// Set the label. // Set the label.
label(machineLabelMap[os]) label(machineLabelMap[os])
steps { steps {
@ -85,9 +64,13 @@ def static getBuildJobName(def configuration, def os) {
} }
Utilities.addPrivatePRTestSCM(newPRJob, project) Utilities.standardJobSetup(newJob, project, true)
Utilities.addStandardOptions(newPRJob) if (isPR) {
Utilities.addStandardPRParameters(newPRJob, project) Utilities.addGithubPRTrigger(newJob, "${os} ${configuration} Build")
Utilities.addGithubPRTrigger(newPRJob, "${os} ${configuration} Build") }
else {
Utilities.addGithubPushTrigger(newJob)
}
}
} }
} }