Skip to content
Snippets Groups Projects
Commit 05cb89a7 authored by garciadeblas's avatar garciadeblas
Browse files

Add port mapping file to stage3 and mount it in docker tests


Change-Id: I807a11f95ef3fb1976a9c52dccabcd46e2e4413d
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 5622f41c
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ properties([
booleanParam(defaultValue: true, description: '', name: 'DO_ROBOT'),
string(defaultValue: 'sanity', description: 'sanity/regression/daily are the common options', name: 'ROBOT_TAG_NAME'),
string(defaultValue: '/home/jenkins/hive/robot-systest.cfg', description: '', name: 'ROBOT_VIM'),
string(defaultValue: '/home/jenkins/hive/port-mapping-etsi-vim.yaml', description: 'Port mapping file for SDN assist in ETSI VIM', name: 'ROBOT_PORT_MAPPING_VIM'),
string(defaultValue: '/home/jenkins/hive/kubeconfig.yaml', description: '', name: 'KUBECONFIG'),
string(defaultValue: '/home/jenkins/hive/clouds.yaml', description: '', name: 'CLOUDS'),
string(defaultValue: 'Default', description: '', name: 'INSTALLER'),
......@@ -55,7 +56,7 @@ properties([
////////////////////////////////////////////////////////////////////////////////////////
// Helper Functions
////////////////////////////////////////////////////////////////////////////////////////
def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null,pass_th='0.0',unstable_th='0.0') {
def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,portmappingfile=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 )
{
......@@ -77,7 +78,7 @@ def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus
}
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 ${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 -v ${portmappingfile}:/root/port-mapping.yaml ${hostfilemount} opensourcemano/tests:${tagName} -c -t ${testName}"
} finally {
sh "cp ${tempdir}/* ."
outputDirectory = sh(returnStdout: true, script: "pwd").trim()
......@@ -522,6 +523,7 @@ EOF"""
prometheusHostname,
prometheusPort,
params.ROBOT_VIM,
params.ROBOT_PORT_MAPPING_VIM,
params.KUBECONFIG,
params.CLOUDS,
hostfile,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment