Add random seed for each wf-job run
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( same params, but expected to have different result(aka, generate uniq repo url, based on build_id or etc)
PRODX-47114
Change-Id: I1b1fff2ce2a1d24c95294e16bae43a5cad7d10b8
diff --git a/src/com/mirantis/mk/Workflow.groovy b/src/com/mirantis/mk/Workflow.groovy
index 224ae77..0d049e0 100644
--- a/src/com/mirantis/mk/Workflow.groovy
+++ b/src/com/mirantis/mk/Workflow.groovy
@@ -223,6 +223,9 @@
_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.addAll([string(name: 'RANDOM_SEED_STRING', value: "${env.JOB_NAME.toLowerCase()}-${env.BUILD_NUMBER}-${UUID.randomUUID().toString().split('-')[0]}")])
common.infoMsg(_msg)
return parameters
}