forked from dotnet/standard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
netci.groovy
34 lines (29 loc) · 1.12 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;
// Defines a the new of the repo, used elsewhere in the file
def project = GithubProject
def branch = GithubBranchName
// Generate the builds for commit and PRJob
[true, false].each { isPR ->
['Windows_NT', 'Ubuntu16.04', 'OSX10.12',].each { osName ->
def newJobName = Utilities.getFullJobName(project, osName, isPR)
def newJob = job(newJobName) {
steps {
if (osName == 'Windows_NT') {
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VSDevcmd.bat\" && build.cmd -c")
}
else {
shell("sudo HOME=\$WORKSPACE/tempHome ./build.sh -c")
}
}
}
Utilities.setMachineAffinity(newJob, osName, 'latest-or-auto')
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
if (isPR) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${osName}")
}
else {
Utilities.addGithubPushTrigger(newJob)
}
}
}