[3]Fix random seed pass for each wf-job run
* injection order fix :facepalm:
PRODX-48965
Related: PRODX-47114
Change-Id: I0c3745b721a37c47f99f47be0ed6578fa1629796
diff --git a/src/com/mirantis/mk/Workflow.groovy b/src/com/mirantis/mk/Workflow.groovy
index 5256287..61e9b33 100644
--- a/src/com/mirantis/mk/Workflow.groovy
+++ b/src/com/mirantis/mk/Workflow.groovy
@@ -241,8 +241,6 @@
def runJob(job_name, job_parameters, global_variables, Boolean propagate = false) {
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:
@@ -251,6 +249,8 @@
parameters.add([$class: "StringParameterValue",
name : "RANDOM_SEED_STRING",
value : rand_value])
+ // Build the job
+ def job_info = build job: "${job_name}", parameters: parameters, propagate: propagate
return job_info
}