forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netci.groovy
44 lines (34 loc) · 1.46 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
35
36
37
38
39
40
41
42
43
44
// Import the utility functionality.
import jobs.generation.Utilities;
def project = 'dotnet/corefx'
// **************************
// Define code coverage build
// **************************
// Define build string
def codeCoverageBuildString = '''call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat" && build.cmd /p:Coverage=true'''
// Generate a rolling (12 hr job) and a PR job that can be run on demand
def rollingCCJob = job(Utilities.getFullJobName(project, 'code_coverage_windows', false)) {
label('windows')
steps {
batchFile(codeCoverageBuildString)
}
}
def prCCJob = job(Utilities.getFullJobName(project, 'code_coverage_windows', true)) {
label('windows')
steps {
batchFile(codeCoverageBuildString)
}
}
// For both jobs, archive the coverage info and publish an HTML report
[rollingCCJob, prCCJob].each { newJob ->
Utilities.addHtmlPublisher(newJob, 'bin/tests/coverage', 'Code Coverage Report', 'index.htm')
Utilities.addArchival(newJob, '**/coverage/*,msbuild.log')
}
Utilities.addScm(rollingCCJob, project)
Utilities.addStandardOptions(rollingCCJob)
Utilities.addStandardNonPRParameters(rollingCCJob)
Utilities.addPeriodicTrigger(rollingCCJob, '@daily')
Utilities.addPRTestSCM(prCCJob, project)
Utilities.addStandardOptions(prCCJob)
Utilities.addStandardPRParameters(prCCJob, project)
Utilities.addGithubPRTrigger(prCCJob, 'Code Coverage Windows Debug', '@dotnet-bot test code coverage please')