pxt-calliope/jenkins.groovy

33 lines
903 B
Groovy
Raw Normal View History

2017-02-04 01:19:22 +01:00
import jobs.generation.Utilities;
import jobs.generation.InternalUtilities;
def project = GithubProject
def branch = GithubBranchName
[true, false].each { isPR ->
def newJobName = InternalUtilities.getFullJobName(project, "Default", isPR)
def newJob = job(newJobName) {
steps {
shell("./jenkins.sh ${isPR}")
}
if (!isPR) {
wrappers {
credentialsBinding {
string('PXT_ACCESS_TOKEN', 'pxt_access_token')
string('PXT_RELEASE_REPO', 'pxt_release_repo_calliope')
}
}
}
}
Utilities.setMachineAffinity(newJob, 'Ubuntu', '20161020')
InternalUtilities.standardJobSetup(newJob, project, isPR, "*/*")
if (isPR) {
Utilities.addGithubPRTrigger(newJob, "Default Testing")
} else {
Utilities.addGithubPushTrigger(newJob)
}
}