| |
@@ -16,6 +16,7 @@
|
| |
import toml
|
| |
|
| |
import monitor_gating
|
| |
+ import monitor_gating_multi_builds
|
| |
|
| |
s = sched.scheduler(time.time, time.sleep)
|
| |
conf = toml.load
|
| |
@@ -54,7 +55,7 @@
|
| |
delay = conf["delay"]
|
| |
print("Tests started:", datetime.datetime.utcnow())
|
| |
try:
|
| |
- #TEST HERE
|
| |
+ # Single Build Gating
|
| |
single_args = conf["workflow_single_gating_args"].split()
|
| |
notify(
|
| |
topic=f"single-build.start",
|
| |
@@ -73,9 +74,31 @@
|
| |
"success": success,
|
| |
}
|
| |
)
|
| |
+
|
| |
+ # Multi Build Gating
|
| |
+ multi_args = conf["workflow_multi_gating_args"].split()
|
| |
+ notify(
|
| |
+ topic=f"multi-build.start",
|
| |
+ message={
|
| |
+ "arguments": multi_args,
|
| |
+ }
|
| |
+ )
|
| |
+ output = monitor_gating_multi_builds.main(multi_args)
|
| |
+ output_text="\n".join(output)
|
| |
+ success="[FAILED]" not in output_text
|
| |
+ notify(
|
| |
+ topic=f"multi-build.end.{success}",
|
| |
+ message={
|
| |
+ "output": output,
|
| |
+ "output_text": output_text,
|
| |
+ "success": success,
|
| |
+ }
|
| |
+ )
|
| |
+
|
| |
print("Tests finished:", datetime.datetime.utcnow())
|
| |
except Exception as err:
|
| |
print(f"Tests failed with: {err}")
|
| |
+ print(sys.exc_info()[0])
|
| |
print(f"Next run in: {delay} seconds")
|
| |
s.enter(delay, 1, schedule, argument=(conf,))
|
| |
|
| |