2017-02-04 01:19:22 +01:00
|
|
|
import jobs.generation.Utilities;
|
|
|
|
import jobs.generation.InternalUtilities;
|
|
|
|
|
|
|
|
def project = GithubProject
|
2017-03-11 00:01:46 +01:00
|
|
|
def projectName = "pxt-calliope"
|
2017-02-04 01:19:22 +01:00
|
|
|
|
|
|
|
[true, false].each { isPR ->
|
2017-03-11 00:01:46 +01:00
|
|
|
def newJobName = projectName
|
|
|
|
|
|
|
|
if (isPR) {
|
|
|
|
newJobName += "_PR"
|
|
|
|
} else {
|
|
|
|
newJobName += "_Push"
|
|
|
|
}
|
|
|
|
|
2017-02-04 01:19:22 +01:00
|
|
|
def newJob = job(newJobName) {
|
|
|
|
steps {
|
2017-02-06 23:06:41 +01:00
|
|
|
shell("chmod +x ./jenkins.sh")
|
2017-02-04 01:19:22 +01:00
|
|
|
shell("./jenkins.sh ${isPR}")
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isPR) {
|
|
|
|
wrappers {
|
|
|
|
credentialsBinding {
|
2017-03-11 00:01:46 +01:00
|
|
|
string("PXT_ACCESS_TOKEN", "pxt_access_token")
|
2017-05-27 02:59:17 +02:00
|
|
|
string("PXT_RELEASE_REPO", "pxt_release_repo")
|
2017-02-04 01:19:22 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-11 00:01:46 +01:00
|
|
|
Utilities.setMachineAffinity(newJob, "Ubuntu", "20161020")
|
2017-02-04 01:19:22 +01:00
|
|
|
InternalUtilities.standardJobSetup(newJob, project, isPR, "*/*")
|
|
|
|
|
|
|
|
if (isPR) {
|
|
|
|
Utilities.addGithubPRTrigger(newJob, "Default Testing")
|
|
|
|
} else {
|
|
|
|
Utilities.addGithubPushTrigger(newJob)
|
|
|
|
}
|
|
|
|
}
|