Removes build of LW-UI and adds robot thresholds
Removes build of openvim
Change-Id: I99088214f1e6e9a130bd2cb061f49e53ab721fa1
Signed-off-by: beierlm <mark.beierl@canonical.com>
println("disabling stage_3 invocation")
return
}
println("disabling stage_3 invocation")
return
}
+ // in this case, since this is for daily jobs, the pass threshold for robot tests should be adapted
+ downstream_params.add(string(name: 'ROBOT_PASS_THRESHOLD', value: '99.0'))
}
// callout to stage_2. This is a multi-branch pipeline.
downstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
}
// callout to stage_2. This is a multi-branch pipeline.
downstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
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'),
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: '/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: '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'),
////////////////////////////////////////////////////////////////////////////////////////
// Helper Functions
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
// Helper Functions
////////////////////////////////////////////////////////////////////////////////////////
-def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null) {
+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 )
{
tempdir = sh(returnStdout: true, script: "mktemp -d").trim()
if ( !envfile )
{
- 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()
} finally {
sh "cp ${tempdir}/* ."
outputDirectory = sh(returnStdout: true, script: "pwd").trim()
disableArchiveOutput : false,
reportFileName : "report.html",
logFileName : "log.html",
disableArchiveOutput : false,
reportFileName : "report.html",
logFileName : "log.html",
- passThreshold : 0,
- unstableThreshold: 0,
+ passThreshold : pass_th,
+ unstableThreshold: unstable_th,
otherFiles : "*.png",
])
}
otherFiles : "*.png",
])
}
- 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)
if (upstreamComponent.length()>0) {
println("Skipping upstream fetch of "+upstreamComponent)
list.remove(upstreamComponent)
--tag ${container_name}
"""
}
--tag ${container_name}
"""
}
- prometheusHostname = "prometheus."+IP_ADDRESS+".xip.io"
+ prometheusHostname = "prometheus."+IP_ADDRESS+".nip.io"
- 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',
} else {
// Run -k8s installer here specifying internal docker registry and docker proxy
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'gitlab-registry',
hostfile="${tempdir}/hosts"
sh """cat << EOF > ${hostfile}
127.0.0.1 localhost
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
EOF"""
} else {
hostfile=null
prometheusHostname,
prometheusPort,
params.ROBOT_VIM,
prometheusHostname,
prometheusPort,
params.ROBOT_VIM,
+ params.ROBOT_PORT_MAPPING_VIM,
params.KUBECONFIG,
params.CLOUDS,
hostfile,
params.KUBECONFIG,
params.CLOUDS,
hostfile,
+ 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)
} // 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")
stage_archive = keep_artifacts
} else {
println ("Systest test failed, throwing error")