author | wenzelm |
Tue, 28 Jun 2022 15:17:47 +0200 | |
changeset 75629 | 11e233ba53c8 |
parent 75628 | 6a5e4f17f285 |
child 75630 | e3aa7214eb1a |
permissions | -rw-r--r-- |
64160 | 1 |
/* Title: Pure/Admin/ci_profile.scala |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
2 |
Author: Lars Hupel and Fabian Huch, TU Munich |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
3 |
|
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
4 |
Build profile for continuous integration services. |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
5 |
*/ |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
6 |
|
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
7 |
package isabelle |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
8 |
|
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
9 |
|
64055 | 10 |
import java.time.{Instant, ZoneId} |
63472 | 11 |
import java.time.format.DateTimeFormatter |
68013 | 12 |
import java.util.{Properties => JProperties, Map => JMap} |
63328
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
13 |
|
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
14 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
15 |
object CI_Profile { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
16 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
17 |
/* Result */ |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
18 |
|
73934
39e0c7fac69e
jenkins: pre/post-hook results
Fabian Huch <huch@in.tum.de>
parents:
73359
diff
changeset
|
19 |
case class Result(rc: Int) |
75393 | 20 |
case object Result { |
74306 | 21 |
def ok: Result = Result(Process_Result.RC.ok) |
22 |
def error: Result = Result(Process_Result.RC.error) |
|
73934
39e0c7fac69e
jenkins: pre/post-hook results
Fabian Huch <huch@in.tum.de>
parents:
73359
diff
changeset
|
23 |
} |
39e0c7fac69e
jenkins: pre/post-hook results
Fabian Huch <huch@in.tum.de>
parents:
73359
diff
changeset
|
24 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
25 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
26 |
/* Profile */ |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
27 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
28 |
case class Profile(threads: Int, jobs: Int, numa: Boolean) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
29 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
30 |
object Profile { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
31 |
def from_host: Profile = { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
32 |
Isabelle_System.hostname() match { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
33 |
case "hpcisabelle" => Profile(8, 8, numa = true) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
34 |
case "lxcisa1" => Profile(4, 10, numa = false) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
35 |
case _ => Profile(2, 2, numa = false) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
36 |
} |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
37 |
} |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
38 |
} |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
39 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
40 |
|
75629 | 41 |
/* Build_Config */ |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
42 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
43 |
case class Build_Config( |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
44 |
documents: Boolean = true, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
45 |
clean: Boolean = true, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
46 |
include: List[Path] = Nil, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
47 |
select: List[Path] = Nil, |
75629 | 48 |
pre_hook: () => Result = () => Result.ok, |
49 |
post_hook: Build.Results => Result = _ => Result.ok, |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
50 |
selection: Sessions.Selection = Sessions.Selection.empty |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
51 |
) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
52 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
53 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
54 |
/* Status */ |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
55 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
56 |
sealed abstract class Status(val str: String) { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
57 |
def merge(that: Status): Status = (this, that) match { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
58 |
case (Ok, s) => s |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
59 |
case (Failed, _) => Failed |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
60 |
case (Skipped, Failed) => Failed |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
61 |
case (Skipped, _) => Skipped |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
62 |
} |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
63 |
} |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
64 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
65 |
object Status { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
66 |
def merge(statuses: List[Status]): Status = |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
67 |
statuses.foldLeft(Ok: Status)(_ merge _) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
68 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
69 |
def from_results(results: Build.Results, session: String): Status = |
75629 | 70 |
if (results.cancelled(session)) Skipped |
71 |
else if (results(session).ok) Ok |
|
72 |
else Failed |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
73 |
} |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
74 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
75 |
case object Ok extends Status("ok") |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
76 |
case object Skipped extends Status("skipped") |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
77 |
case object Failed extends Status("failed") |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
78 |
|
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
79 |
|
75393 | 80 |
private def load_properties(): JProperties = { |
63328
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
81 |
val props = new JProperties() |
63418 | 82 |
val file_name = Isabelle_System.getenv("ISABELLE_CI_PROPERTIES") |
83 |
||
75393 | 84 |
if (file_name != "") { |
63418 | 85 |
val file = Path.explode(file_name).file |
75629 | 86 |
if (file.exists()) props.load(new java.io.FileReader(file)) |
63418 | 87 |
props |
88 |
} |
|
75629 | 89 |
else props |
63328
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
90 |
} |
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
91 |
|
75393 | 92 |
private def compute_timing(results: Build.Results, group: Option[String]): Timing = { |
75629 | 93 |
val timings = |
94 |
results.sessions.collect { |
|
95 |
case session if group.forall(results.info(session).groups.contains(_)) => |
|
96 |
results(session).timing |
|
97 |
} |
|
73359 | 98 |
timings.foldLeft(Timing.zero)(_ + _) |
63385 | 99 |
} |
100 |
||
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
101 |
private def with_documents(options: Options, config: Build_Config): Options = { |
75629 | 102 |
if (config.documents) { |
63894
7534eec7cfad
benchmark doesn't need to build documents
Lars Hupel <lars.hupel@mytum.de>
parents:
63685
diff
changeset
|
103 |
options |
7534eec7cfad
benchmark doesn't need to build documents
Lars Hupel <lars.hupel@mytum.de>
parents:
63685
diff
changeset
|
104 |
.bool.update("browser_info", true) |
7534eec7cfad
benchmark doesn't need to build documents
Lars Hupel <lars.hupel@mytum.de>
parents:
63685
diff
changeset
|
105 |
.string.update("document", "pdf") |
7534eec7cfad
benchmark doesn't need to build documents
Lars Hupel <lars.hupel@mytum.de>
parents:
63685
diff
changeset
|
106 |
.string.update("document_variants", "document:outline=/proof,/ML") |
75629 | 107 |
} |
108 |
else options |
|
63894
7534eec7cfad
benchmark doesn't need to build documents
Lars Hupel <lars.hupel@mytum.de>
parents:
63685
diff
changeset
|
109 |
} |
7534eec7cfad
benchmark doesn't need to build documents
Lars Hupel <lars.hupel@mytum.de>
parents:
63685
diff
changeset
|
110 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
111 |
def hg_id(path: Path): String = |
64232
367d83d6030e
clarified hg.id operation, with explicit tip as default;
wenzelm
parents:
64217
diff
changeset
|
112 |
Mercurial.repository(path).id() |
63385 | 113 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
114 |
def print_section(title: String): Unit = |
63349 | 115 |
println(s"\n=== $title ===\n") |
116 |
||
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
117 |
def build(profile: Profile, config: Build_Config): Unit = { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
118 |
val isabelle_home = Path.explode(Isabelle_System.getenv_strict("ISABELLE_HOME")) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
119 |
val isabelle_id = hg_id(isabelle_home) |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
120 |
|
75629 | 121 |
val start_time = |
122 |
Instant.now().atZone(ZoneId.systemDefault).format(DateTimeFormatter.RFC_1123_DATE_TIME) |
|
63385 | 123 |
|
63349 | 124 |
print_section("CONFIGURATION") |
64081 | 125 |
println(Build_Log.Settings.show()) |
63328
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
126 |
val props = load_properties() |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
127 |
System.getProperties.asInstanceOf[JMap[AnyRef, AnyRef]].putAll(props) |
63328
7a8515c58271
read Java system properties from ISABELLE_CI_PROPERTIES
Lars Hupel <lars.hupel@mytum.de>
parents:
63294
diff
changeset
|
128 |
|
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
129 |
val options = |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
130 |
with_documents(Options.init(), config) |
65056 | 131 |
.int.update("parallel_proofs", 1) |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
132 |
.int.update("threads", profile.threads) |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
133 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
134 |
println(s"jobs = ${profile.jobs}, threads = ${profile.threads}, numa = ${profile.numa}") |
69120
9d3b41732fe0
Jenkins: detect machine; adjust job parameters accordingly
Lars Hupel <lars.hupel@mytum.de>
parents:
68498
diff
changeset
|
135 |
|
63349 | 136 |
print_section("BUILD") |
63472 | 137 |
println(s"Build started at $start_time") |
138 |
println(s"Isabelle id $isabelle_id") |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
139 |
val pre_result = config.pre_hook() |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
140 |
|
63472 | 141 |
print_section("LOG") |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
142 |
val (results, elapsed_time) = { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
143 |
val progress = new Console_Progress(verbose = true) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
144 |
val start_time = Time.now() |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
145 |
val results = progress.interrupt_handler { |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
146 |
Build.build( |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
147 |
options + "system_heaps", |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
148 |
selection = config.selection, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
149 |
progress = progress, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
150 |
clean_build = config.clean, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
151 |
verbose = true, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
152 |
numa_shuffling = profile.numa, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
153 |
max_jobs = profile.jobs, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
154 |
dirs = config.include, |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
155 |
select_dirs = config.select) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
156 |
} |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
157 |
val end_time = Time.now() |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
158 |
(results, end_time - start_time) |
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
159 |
} |
63349 | 160 |
|
161 |
print_section("TIMING") |
|
63385 | 162 |
|
163 |
val groups = results.sessions.map(results.info).flatMap(_.groups) |
|
164 |
for (group <- groups) |
|
165 |
println(s"Group $group: " + compute_timing(results, Some(group)).message_resources) |
|
63387
3395fe5e3893
more accurate total timing
Lars Hupel <lars.hupel@mytum.de>
parents:
63385
diff
changeset
|
166 |
|
3395fe5e3893
more accurate total timing
Lars Hupel <lars.hupel@mytum.de>
parents:
63385
diff
changeset
|
167 |
val total_timing = compute_timing(results, None).copy(elapsed = elapsed_time) |
3395fe5e3893
more accurate total timing
Lars Hupel <lars.hupel@mytum.de>
parents:
63385
diff
changeset
|
168 |
println("Overall: " + total_timing.message_resources) |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
169 |
|
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
170 |
if (!results.ok) { |
63349 | 171 |
print_section("FAILED SESSIONS") |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
172 |
|
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
173 |
for (name <- results.sessions) { |
75629 | 174 |
if (results.cancelled(name)) println(s"Session $name: CANCELLED") |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
175 |
else { |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
176 |
val result = results(name) |
75629 | 177 |
if (!result.ok) println(s"Session $name: FAILED ${ result.rc }") |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
178 |
} |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
179 |
} |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
180 |
} |
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
181 |
|
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
182 |
val post_result = config.post_hook(results) |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
183 |
|
73934
39e0c7fac69e
jenkins: pre/post-hook results
Fabian Huch <huch@in.tum.de>
parents:
73359
diff
changeset
|
184 |
System.exit(List(pre_result.rc, results.rc, post_result.rc).max) |
63288
e0513d6e4916
start moving actual Jenkins build scripts into the repository
Lars Hupel <lars.hupel@mytum.de>
parents:
diff
changeset
|
185 |
} |
75628
6a5e4f17f285
switched to statically compiled ci profile;
Fabian Huch <huch@in.tum.de>
parents:
75393
diff
changeset
|
186 |
} |