diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 2d8bdc81e8..e357b32d80 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -1189,44 +1189,45 @@ def addGrinderLink() { def labelValue = "" def targetValue = "" def customTargetKeyValue = "" - def rerunIterations = "" def urlParams = params.findAll { // Exclude separator and help text parameters from url !(it.key.endsWith('_PARAMS') || it.key.endsWith('_HELP_TEXT')) } urlParams.each { key, value -> value = URLEncoder.encode(value.toString(), "UTF-8") - url += "${key}=${value}" - if (i != urlParams.size()) { - url += "&" - } - i++; - if ( key == "LABEL" ) { + if (key == "LABEL") { labelValue = "LABEL=${value}" } - if ( key == "TARGET" ) { + if (key == "TARGET") { targetValue = "TARGET=${value}" } - if ( key == "CUSTOM_TARGET") { + if (key == "CUSTOM_TARGET") { customTargetKeyValue = "CUSTOM_TARGET=${value}" } - if ( key == "RERUN_ITERATIONS") { - rerunIterations = "RERUN_ITERATIONS=${value}" + // Always set RERUN_ITERATIONS to 0 for Grinder link + if (key == "RERUN_ITERATIONS") { + value = "0" + } + // Always set LightWeightCheckout to false for Grinder link + if (key == "LIGHT_WEIGHT_CHECKOUT") { + value = "false" + } + // Always set Parallel to None for Grinder link + if (key == "PARALLEL") { + value = "None" } + url += "${key}=${value}" + if (i != urlParams.size()) { + url += "&" + } + i++; } + env.RERUN_LINK = url env.FAILED_TEST_TARGET = targetValue env.CUSTOM_TARGET_KEY_VALUE = customTargetKeyValue - // reset RERUN_ITERATIONS to 0 in Rerun in Grinder link - if (rerunIterations) { - url = url.replace(rerunIterations,"RERUN_ITERATIONS=0") - } - - // reset LIGHT_WEIGHT_CHECKOUT to false in Rerun in Grinder link - url = url.replace("LIGHT_WEIGHT_CHECKOUT=true", "LIGHT_WEIGHT_CHECKOUT=false") - currentBuild.description += "
Grinder Wiki" echo "Rerun in Grinder: ${url}" currentBuild.description += "
Rerun in Grinder Change TARGET to run only the failed test targets."