X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=d9c687cf70c9245088830ba7d78c070ff45f87c2;hb=20611225b7c1283bc5ce1572b5515e898c6df2b5;hp=98b0020323b59fe01ba4cbbe6c7a8ca0cdc97ea3;hpb=5622f41ca36d47d6a0cff4f79361719bcf5aca9d;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 98b00203..d9c687cf 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -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,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 ) { @@ -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 ${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}" } finally { sh "cp ${tempdir}/* ." outputDirectory = sh(returnStdout: true, script: "pwd").trim() @@ -177,6 +178,7 @@ node("${params.NODE}") { server_id = null http_server_name = null devopstempdir = null + jujutempdir = null useCharmedInstaller = params.INSTALLER.equalsIgnoreCase("charmed") try { @@ -223,7 +225,7 @@ node("${params.NODE}") { } parallelSteps = [:] - def list = ["RO", "openvim", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "NG-UI", "PLA", "tests"] + def list = ["RO", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "NG-UI", "PLA", "tests"] if (upstreamComponent.length()>0) { println("Skipping upstream fetch of "+upstreamComponent) list.remove(upstreamComponent) @@ -431,7 +433,7 @@ node("${params.NODE}") { remote.pty = true sshCommand remote: remote, command: """ - wget https://osm-download.etsi.org/ftp/osm-9.0-nine/install_osm.sh + wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh chmod +x ./install_osm.sh sed -i '1 i\\export PATH=/snap/bin:\${PATH}' ~/.bashrc """ @@ -489,6 +491,13 @@ node("${params.NODE}") { /usr/share/osm-devops/installers/osm_health.sh -k -s ${stackName} """ } // stage("OSM Health") +/////////////////////////////////////////////////////////////////////////////////////// +// Get juju data from installed OSM in remote vm +/////////////////////////////////////////////////////////////////////////////////////// + jujutempdir = sh(returnStdout: true, script: "mktemp -d").trim() + jujudatafolder = jujutempdir + '/juju' + homefolder = sshCommand remote: remote, command: 'echo ${HOME}' + sshGet remote: remote, from: homefolder + '/.local/share/juju', into: jujutempdir, override: true } // if ( params.DO_INSTALL ) @@ -522,6 +531,8 @@ EOF""" prometheusHostname, prometheusPort, params.ROBOT_VIM, + params.ROBOT_PORT_MAPPING_VIM, + jujudatafolder, params.KUBECONFIG, params.CLOUDS, hostfile, @@ -636,5 +647,9 @@ EOF""" if ( devopstempdir != null ) { sh "rm -rf ${devopstempdir}" } + + if ( jujutempdir != null ) { + sh "rm -rf ${jujutempdir}" + } } }