Fix: if no cutoff was found -1 was returned with side effect of applying not
[lttng-ci.git] / dsl / kernel-lttng-modules.seed.groovy
index 202a11dc7a00e4456ccad8729b1b85f2a020ec21..8477961b1f1cda1f88e013e9a84e8453071440b5 100644 (file)
@@ -87,8 +87,8 @@ class BasicVersion implements Comparable<BasicVersion> {
     }
 }
 
-def kernelTagCutOff = new BasicVersion("4.0", "")
-def modulesBranches = ["master","stable-2.5.0","stable-2.6.0", "stable-2.4.0"]
+def kernelTagCutOff = new BasicVersion("4.3", "")
+def modulesBranches = ["master","stable-2.5","stable-2.6", "stable-2.4"]
 
 
 def linuxURL = "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"
@@ -141,6 +141,10 @@ if ( result.exitValue() == 0 ) {
     // Find the version cutoff
     def cutoffPos = versions.findIndexOf{(it.major >= kernelTagCutOff.major) && (it.minor >= kernelTagCutOff.minor) && (it.revision >= kernelTagCutOff.revision) && (it.build >= kernelTagCutOff.build) && (it.rc >= kernelTagCutOff.rc)}
 
+       // If error set cutoff on last so no job are created
+       if (cutoffPos == -1) {
+               cutoffPos = versions.size()
+       }
     // Get last version and include only last rc
     def last
     def lastNoRcPos
@@ -158,6 +162,7 @@ if ( result.exitValue() == 0 ) {
     String modulesPrefix = "lttng-modules"
     String kernelPrefix = "dsl-kernel"
     String separator = "-"
+
     // Actual job creation
     for (int i = cutoffPos; i < versions.size() ; i++) {
 
@@ -325,6 +330,9 @@ if (fail){
             steps {
                 systemGroovyCommand(dslTriggerKernel)
             }
+                       triggers {
+                               cron("H 0 * * *")
+                       }
                }
 
                modulesBranches.each { branch ->
@@ -332,6 +340,9 @@ if (fail){
                                steps {
                                        systemGroovyCommand(dslTriggerModule.replaceAll("JOBPREFIX",modulesPrefix + separator + branch + separator))
                                }
+                               triggers {
+                                       scm('@daily')
+                               }
                        }
                }
     }
This page took 0.025305 seconds and 4 git commands to generate.