From: Jonathan Rajotte Date: Thu, 11 Jun 2015 21:07:19 +0000 (-0400) Subject: Fix: if no cutoff was found -1 was returned with side effect of applying not X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=831d43834faae0d66470ede8aa2550378d2c4ed7;hp=0bb106eb816e82713ee0fc75c95de2ec22fb1c31;p=lttng-ci.git Fix: if no cutoff was found -1 was returned with side effect of applying not cutoff --- diff --git a/dsl/kernel-lttng-modules.seed.groovy b/dsl/kernel-lttng-modules.seed.groovy index 3fed041..8477961 100644 --- a/dsl/kernel-lttng-modules.seed.groovy +++ b/dsl/kernel-lttng-modules.seed.groovy @@ -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++) {