Fix: if no cutoff was found -1 was returned with side effect of applying not
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 11 Jun 2015 21:07:19 +0000 (17:07 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 11 Jun 2015 21:07:19 +0000 (17:07 -0400)
cutoff

dsl/kernel-lttng-modules.seed.groovy

index 3fed04101088f74125e73a7d6d30d14809d8bbf7..8477961b1f1cda1f88e013e9a84e8453071440b5 100644 (file)
@@ -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++) {
 
This page took 0.023783 seconds and 4 git commands to generate.