X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=c9c5f73529c49ba6281fb04758be0a360b825aa4;hb=fa81f28edaf5962fbc034ddcf783c4298573500b;hp=04c1e1bd0a0d0f530f7ebd6cde60fbcfedf96725;hpb=481ae7d606286c40e775fddd17146285a7d1a3cc;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 04c1e1bd..c9c5f735 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -71,7 +71,7 @@ def run_systest(stackName,tagName,testName,envfile=null) { 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 ) { @@ -87,8 +87,13 @@ def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus 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() @@ -371,7 +376,7 @@ node("${params.NODE}") { remote.logLevel = 'INFO' sshCommand remote: remote, command: """ - wget https://osm-download.etsi.org/ftp/osm-8.0-eight/install_osm.sh + wget https://osm-download.etsi.org/ftp/osm-9.0-nine/install_osm.sh chmod +x ./install_osm.sh """ @@ -442,6 +447,10 @@ EOF""" 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, @@ -451,7 +460,8 @@ EOF""" params.ROBOT_VIM, params.KUBECONFIG, params.CLOUDS, - hostfile) + hostfile, + jujuPassword) } } } finally {