X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fdevops.git;a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=bc23e441b8468d42a8b05294ae4bfdc755ca40ce;hp=72cf2cd9aa8d8c08bc3b4025673219ce8b6cf85a;hb=0062727f3c596aa3c4e87b4ea497bdf69b3dedd9;hpb=4c63075797178555994ba54f46755d1228426028 diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 72cf2cd9..bc23e441 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -43,10 +43,11 @@ 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'), - string(defaultValue: '99.0', description: '% passed Robot tests to mark the build as passed', name: 'ROBOT_PASS_THRESHOLD'), + string(defaultValue: '100.0', description: '% passed Robot tests to mark the build as passed', name: 'ROBOT_PASS_THRESHOLD'), string(defaultValue: '80.0', description: '% passed Robot tests to mark the build as unstable (if lower, it will be failed)', name: 'ROBOT_UNSTABLE_THRESHOLD'), ]) ]) @@ -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() @@ -223,7 +224,7 @@ node("${params.NODE}") { } parallelSteps = [:] - def list = ["RO", "openvim", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "LW-UI", "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 +432,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 """ @@ -457,9 +458,9 @@ node("${params.NODE}") { --tag ${container_name} """ } - prometheusHostname = "prometheus."+IP_ADDRESS+".xip.io" + prometheusHostname = "prometheus."+IP_ADDRESS+".nip.io" prometheusPort = 80 - osmHostname = "nbi."+IP_ADDRESS+".xip.io:443" + osmHostname = "nbi."+IP_ADDRESS+".nip.io:443" } else { // Run -k8s installer here specifying internal docker registry and docker proxy withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'gitlab-registry', @@ -505,7 +506,7 @@ node("${params.NODE}") { hostfile="${tempdir}/hosts" sh """cat << EOF > ${hostfile} 127.0.0.1 localhost -${remote.host} prometheus.${remote.host}.xip.io nbi.${remote.host}.xip.io +${remote.host} prometheus.${remote.host}.nip.io nbi.${remote.host}.nip.io EOF""" } else { hostfile=null @@ -522,16 +523,20 @@ EOF""" prometheusHostname, prometheusPort, params.ROBOT_VIM, + params.ROBOT_PORT_MAPPING_VIM, params.KUBECONFIG, params.CLOUDS, hostfile, - jujuPassword) + jujuPassword, + params.ROBOT_PASS_THRESHOLD, + params.ROBOT_UNSTABLE_THRESHOLD + ) } // stage("System Integration Test") } finally { stage("Archive Container Logs") { // Archive logs to containers_logs.txt archive_logs(remote) - if ( ! currentBuild.result.equals('UNSTABLE') && ! currentBuild.result.equals('FAILURE')) { + if ( ! currentBuild.result.equals('FAILURE') ) { stage_archive = keep_artifacts } else { println ("Systest test failed, throwing error")