pxt-calliope/jenkins.groovy

34 lines
946 B
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
def branch = GithubBranchName
[true, false].each { isPR ->
def newJobName = InternalUtilities.getFullJobName(project, "Default", isPR)
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 {
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)
}
}