1
+ import jobs.generation.ArchivalSettings ;
1
2
import jobs.generation.Utilities ;
2
3
3
4
def project = GithubProject ;
4
5
def branch = GithubBranchName ;
5
- loggingOptions = " /clp:v=detailed /p:MinimalConsoleLogOutput=false" ;
6
+ loggingOptions = " " ;
7
+
8
+ def addArchival (def job ) {
9
+ def archivalSettings = new ArchivalSettings ()
10
+ // non-tarball builds just build in the root workspace directory.
11
+ // tarball builds clone to source-build, build from there, and then
12
+ // additionally build from a tarball-output directory.
13
+ // Grab these logs from all of those locations.
14
+ [ " " , " source-build/" , " tarball-output/" ]. each { logRoot ->
15
+ archivalSettings. addFiles(" ${ logRoot} bin/logs/*" )
16
+ archivalSettings. addFiles(" ${ logRoot} bin/prebuilt-report/*" )
17
+ archivalSettings. addFiles(" ${ logRoot} src/**/*.binlog" )
18
+ archivalSettings. addFiles(" ${ logRoot} src/**/*.log" )
19
+ archivalSettings. addFiles(" ${ logRoot} init-tools.log" )
20
+ archivalSettings. addFiles(" ${ logRoot} msbuild.log" )
21
+ archivalSettings. addFiles(" ${ logRoot} testing-smoke/smoke-test.log" )
22
+ }
23
+
24
+ archivalSettings. setFailIfNothingArchived()
25
+ archivalSettings. setAlwaysArchive()
26
+
27
+ Utilities . addArchival(job, archivalSettings)
28
+ }
6
29
7
30
def addBuildStepsAndSetMachineAffinity (def job , String os , String configuration ) {
8
31
job. with {
@@ -19,7 +42,7 @@ def addBuildStepsAndSetMachineAffinity(def job, String os, String configuration)
19
42
// Dev certs doesn't seem to work in these platforms. https://github.com/dotnet/source-build/issues/560
20
43
smokeTestExcludes + = " --excludeWebHttpsTests" ;
21
44
}
22
- shell(" ./smoke-test.sh --minimal --projectOutput -- configuration ${ configuration} ${ smokeTestExcludes} " );
45
+ shell(" ./smoke-test.sh --minimal --configuration ${ configuration} ${ smokeTestExcludes} " );
23
46
}
24
47
};
25
48
};
@@ -36,6 +59,7 @@ def addPullRequestJob(String project, String branch, String os, String configura
36
59
def newJob = job(newJobName);
37
60
38
61
addBuildStepsAndSetMachineAffinity(newJob, os, configuration);
62
+ addArchival(newJob);
39
63
Utilities . standardJobSetup(newJob, project, true , " */${ branch} " );
40
64
Utilities . setJobTimeout(newJob, 180 );
41
65
Utilities . addGithubPRTriggerForBranch(newJob, branch, contextString, triggerPhrase, ! runByDefault);
@@ -49,6 +73,7 @@ def addPushJob(String project, String branch, String os, String configuration)
49
73
def newJob = job(newJobName);
50
74
51
75
addBuildStepsAndSetMachineAffinity(newJob, os, configuration);
76
+ addArchival(newJob);
52
77
Utilities . standardJobSetup(newJob, project, false , " */${ branch} " );
53
78
Utilities . setJobTimeout(newJob, 180 );
54
79
Utilities . addGithubPushTrigger(newJob);
@@ -82,7 +107,7 @@ def addPushJob(String project, String branch, String os, String configuration)
82
107
shell(" cd ./source-build;./build-source-tarball.sh ../tarball-output --skip-build" );
83
108
84
109
shell(" cd ./tarball-output;./build.sh /p:Configuration=${ configuration} ${ loggingOptions} " )
85
- shell(" cd ./tarball-output;./smoke-test.sh --minimal --projectOutput -- configuration ${ configuration} " )
110
+ shell(" cd ./tarball-output;./smoke-test.sh --minimal --configuration ${ configuration} " )
86
111
}
87
112
}
88
113
@@ -95,6 +120,8 @@ def addPushJob(String project, String branch, String os, String configuration)
95
120
96
121
// Clone into the source-build directory
97
122
Utilities . addScmInSubDirectory(newJob, project, isPR, ' source-build' );
123
+
124
+ addArchival(newJob);
98
125
if (isPR){
99
126
if (configuration == " Release" ){
100
127
Utilities . addGithubPRTriggerForBranch(newJob, branch, contextString);
@@ -132,7 +159,7 @@ def addPushJob(String project, String branch, String os, String configuration)
132
159
// now build from the tarball offline and without access to the regular non-tarball build
133
160
shell(" docker run -u=\"\$ (id -u):\$ (id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home --network none -v \$ (pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2 /opt/tarball/build.sh /p:Configuration=${ configuration} ${ loggingOptions} " );
134
161
// finally, run a smoke-test on the result
135
- shell(" docker run -u=\"\$ (id -u):\$ (id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home -v \$ (pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2 /opt/tarball/smoke-test.sh --minimal --projectOutput -- configuration ${ configuration} " );
162
+ shell(" docker run -u=\"\$ (id -u):\$ (id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home -v \$ (pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2 /opt/tarball/smoke-test.sh --minimal --configuration ${ configuration} " );
136
163
}
137
164
}
138
165
@@ -146,6 +173,8 @@ def addPushJob(String project, String branch, String os, String configuration)
146
173
147
174
// Clone into the source-build directory
148
175
Utilities . addScmInSubDirectory(newJob, project, isPR, ' source-build' );
176
+
177
+ addArchival(newJob);
149
178
if (isPR){
150
179
if (configuration == " Release" ){
151
180
Utilities . addGithubPRTriggerForBranch(newJob, branch, contextString);
0 commit comments