-
Notifications
You must be signed in to change notification settings - Fork 44
/
netci.groovy
32 lines (26 loc) · 949 Bytes
/
netci.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Import the utility functionality.
import jobs.generation.Utilities;
// Import functionality for job reporting
import jobs.generation.JobReport;
def project = GithubProject
def branch = GithubBranchName
// Generate the builds.
[true, false].each { isPR ->
// Define build string
def buildString = "call \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat\" && build.cmd && test.cmd"
def newJob = job(Utilities.getFullJobName(project, '', isPR)) {
steps {
batchFile(buildString)
}
}
Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto')
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
if (isPR) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, 'Windows Build and Test')
}
else {
Utilities.addGithubPushTrigger(newJob)
}
}
// Generate the job report
JobReport.Report.generateJobReport(out)