junit '*.xml'
}
-def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,kubeconfig=null,clouds=null,hostfile=null) {
+def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null) {
tempdir = sh(returnStdout: true, script: "mktemp -d").trim()
if ( !envfile )
{
hostfilemount="-v "+hostfile+":/etc/hosts"
}
+ JUJU_PASSWORD_VAR = ""
+ if ( jujuPassword != null) {
+ JUJU_PASSWORD_VAR = "--env JUJU_PASSWORD="+jujuPassword
+ }
+
try {
- sh "docker run --env OSM_HOSTNAME=${osmHostname} --env PROMETHEUS_HOSTNAME=${prometheusHostname} ${PROMETHEUS_PORT_VAR} --env-file ${envfile} -v ${clouds}:/etc/openstack/clouds.yaml -v ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports ${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 ${kubeconfig}:/root/.kube/config -v ${tempdir}:/robot-systest/reports ${hostfilemount} opensourcemano/tests:${tagName} -c -t ${testName}"
} finally {
sh "cp ${tempdir}/* ."
outputDirectory = sh(returnStdout: true, script: "pwd").trim()
hostfile=null
}
+ jujuPassword=sshCommand remote: remote, command: """
+ echo `juju gui 2>&1 | grep password | cut -d: -f2`
+ """
+
run_robot_systest(
container_name,
params.TEST_NAME,
params.ROBOT_VIM,
params.KUBECONFIG,
params.CLOUDS,
- hostfile)
+ hostfile,
+ jujuPassword)
}
}
} finally {