jjb/lava: Correct YAML loading for lava job results
[lttng-ci.git] / scripts / system-tests / system-trigger.groovy
index c4013daabdf73d3a9f50f656fd1505dd822a608d..55ab11f7111529937bd2ccc322f05f3695a79588 100644 (file)
@@ -308,6 +308,7 @@ def recentLttngBranchesOfInterest = ['master',
   'stable-2.13',
   'stable-2.12']
 def recentLinuxBranchesOfInterest = ['master',
+  'linux-6.6.y',
   'linux-6.1.y',
   'linux-5.15.y',
   'linux-5.10.y',
@@ -441,7 +442,21 @@ currentJobs.each { jobName, jobInfo ->
 
   jobInfo['status'] = 'PENDING';
   jobInfo['build'] = LaunchJob(jobName, jobInfo);
-  ongoingJobs += 1;
+  if (jobInfo['build'] != null) {
+    ongoingJobs += 1;
+  }
+}
+
+// Some jobs may have a null build immediately if LaunchJob
+// failed for some reason, those jobs can immediately be removed.
+def jobKeys = currentJobs.collect { jobName, jobInfo ->
+    return jobName;
+}
+jobKeys.each { k ->
+  if (currentJobs.get(k)['build'] == null) {
+    println(String.format("Removing job '%s' since build is null", k));
+    currentJobs.remove(k);
+  }
 }
 
 while (ongoingJobs > 0) {
@@ -455,7 +470,7 @@ while (ongoingJobs > 0) {
 
     // The isCancelled() method checks if the run was cancelled before
     // execution. We consider such run as being aborted.
-    if (jobBuild == null || jobBuild.isCancelled()) {
+    if (jobBuild.isCancelled()) {
       println("${jobName} was cancelled before launch.")
       isAborted = true;
       abortedRuns.add(jobName);
This page took 0.024427 seconds and 4 git commands to generate.