////////////////////////////////////////////////////////////////////////////////////////
// Helper Functions
////////////////////////////////////////////////////////////////////////////////////////
-def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,portmappingfile=null,jujudata=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null,pass_th='0.0',unstable_th='0.0') {
- tempdir = sh(returnStdout: true, script: "mktemp -d").trim()
- if ( !envfile )
- {
+void run_robot_systest(String tagName,
+ String testName,
+ String osmHostname,
+ String prometheusHostname,
+ Integer prometheusPort=null,
+ String envfile=null,
+ String portmappingfile=null,
+ String jujudata=null,
+ String kubeconfig=null,
+ String clouds=null,
+ String hostfile=null,
+ String jujuPassword=null,
+ String osmRSAfile=null,
+ String passThreshold='0.0',
+ String unstableThreshold='0.0') {
+ tempdir = sh(returnStdout: true, script: 'mktemp -d').trim()
+ if ( !envfile ) {
sh(script: "touch ${tempdir}/env")
envfile="${tempdir}/env"
}
}
try {
- sh "docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} ${PROMETHEUS_PORT_VAR} ${JUJU_PASSWORD_VAR} --env-file ${envfile} -v ${clouds}:/etc/openstack/clouds.yaml -v ${jujudata}:/root/.local/share/juju -v ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports -v ${portmappingfile}:/root/port-mapping.yaml ${hostfilemount} opensourcemano/tests:${tagName} -c -t ${testName}"
+ sh "docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} ${PROMETHEUS_PORT_VAR} ${JUJU_PASSWORD_VAR} --env-file ${envfile} -v ${clouds}:/etc/openstack/clouds.yaml -v ${jujudata}:/root/.local/share/juju -v ${osmRSAfile}:/root/osm_id_rsa -v ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports -v ${portmappingfile}:/root/port-mapping.yaml ${hostfilemount} opensourcemano/tests:${tagName} -c -t ${testName}"
} finally {
sh "cp ${tempdir}/* ."
outputDirectory = sh(returnStdout: true, script: "pwd").trim()
params.CLOUDS,
hostfile,
jujuPassword,
+ SSH_KEY,
params.ROBOT_PASS_THRESHOLD,
params.ROBOT_UNSTABLE_THRESHOLD
)