2017-06-29 16:47:26 +02:00
|
|
|
import jobs.generation.Utilities;
|
|
|
|
import jobs.generation.InternalUtilities;
|
|
|
|
|
|
|
|
def project = GithubProject
|
|
|
|
def projectName = "pxt-ev3"
|
|
|
|
|
|
|
|
[true, false].each { isPR ->
|
|
|
|
def newJobName = projectName
|
|
|
|
|
|
|
|
if (isPR) {
|
|
|
|
newJobName += "_PR"
|
|
|
|
} else {
|
|
|
|
newJobName += "_Push"
|
|
|
|
}
|
|
|
|
|
|
|
|
def newJob = job(newJobName) {
|
|
|
|
steps {
|
|
|
|
shell("chmod +x ./jenkins.sh")
|
|
|
|
shell("./jenkins.sh ${isPR}")
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isPR) {
|
|
|
|
wrappers {
|
|
|
|
credentialsBinding {
|
|
|
|
string("PXT_ACCESS_TOKEN", "pxt_access_token")
|
|
|
|
string("PXT_RELEASE_REPO", "pxt_release_repo_ev3")
|
2018-05-09 18:39:25 +02:00
|
|
|
string("CROWDIN_KEY", "pxt_crowdin_key")
|
2017-06-29 16:47:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Utilities.setMachineAffinity(newJob, "Ubuntu", "20161020")
|
|
|
|
InternalUtilities.standardJobSetup(newJob, project, isPR, "*/*")
|
|
|
|
|
|
|
|
if (isPR) {
|
|
|
|
Utilities.addGithubPRTrigger(newJob, "Default Testing")
|
|
|
|
} else {
|
|
|
|
Utilities.addGithubPushTrigger(newJob)
|
|
|
|
}
|
|
|
|
}
|