forked from dotnet/buildtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netci.groovy
34 lines (28 loc) · 1.03 KB
/
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
33
34
// Import the utility functionality.
import jobs.generation.Utilities;
def project = GithubProject
def branch = GithubBranchName
// Generate the builds for debug and release
["Windows_NT", "Ubuntu14.04"].each { os ->
[true, false].each { isPR ->
def newJob = job(Utilities.getFullJobName(project, os, isPR)) {
steps {
if (os == 'Windows_NT') {
batchFile('''call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat" && build.cmd''')
}
else {
shell('''./build.sh''')
}
}
}
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto')
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
if (isPR) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${os} Debug")
}
else {
Utilities.addGithubPushTrigger(newJob)
}
}
}
Utilities.addCROSSCheck(this, project, branch)