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