pxt-calliope/jenkins.groovy

42 lines
1.0 KiB
Groovy
Raw Permalink Normal View History

2017-02-04 01:19:22 +01:00
import jobs.generation.Utilities;
import jobs.generation.InternalUtilities;
def project = GithubProject
2017-12-12 21:03:43 +01:00
def projectName = "pxt-calliopemini"
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-12-12 21:03:43 +01:00
string("PXT_RELEASE_REPO", "pxt_release_repo_calliopemini")
string("CROWDIN_KEY", "pxt_crowdin_key")
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)
}
}