[2]Fix random seed pass for each wf-job run
* fix for more general way
PRODX-48965
Related: PRODX-47114
Change-Id: Ic936a99b90e3b7c5056ac14c4ed371c17335fad0
diff --git a/src/com/mirantis/mk/Workflow.groovy b/src/com/mirantis/mk/Workflow.groovy
index e8f4ba2..5256287 100644
--- a/src/com/mirantis/mk/Workflow.groovy
+++ b/src/com/mirantis/mk/Workflow.groovy
@@ -223,11 +223,6 @@
_msg += "\n${param.key}: <${param.value.type}>\n${multistring_value}"
}
}
- // Inject hidden random parameter (is not showed in jjb) to be sure we are triggering unique downstream job.
- // Most actual case - parallel run for same jobs( but with different params)
- parameters.add([$class: "StringParameterValue",
- name : "RANDOM_SEED_STRING",
- value : "${env.JOB_NAME.toLowerCase()}-${env.BUILD_NUMBER}-${UUID.randomUUID().toString().split('-')[0]}"])
common.infoMsg(_msg)
return parameters
}
@@ -248,6 +243,14 @@
def parameters = generateParameters(job_parameters, global_variables)
// Build the job
def job_info = build job: "${job_name}", parameters: parameters, propagate: propagate
+ // Inject hidden random parameter (is not showed in jjb) to be sure we are triggering unique downstream job.
+ // Most actual case - parallel run for same jobs( but with different params)
+ // WARNING: dont move hack to generateParameters:
+ // PRODX-48965 - it will conflict with si_run_steps logic and will be copy-paste to sub.jobs
+ String rand_value = "${env.JOB_NAME.toLowerCase()}-${env.BUILD_NUMBER}-${UUID.randomUUID().toString().split('-')[0]}"
+ parameters.add([$class: "StringParameterValue",
+ name : "RANDOM_SEED_STRING",
+ value : rand_value])
return job_info
}