X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_helper.groovy;h=1e724ff7a522c47d9514c130ed03a068a1263c09;hb=9d25cf8975b90133a9c97343b73373eba5205bd7;hp=9708b1c8a0ac6a2018188837a9407aebaffbe36f;hpb=9054244cd2a7451f75157d7fa3ec5d2ff88176be;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_helper.groovy b/jenkins/ci-pipelines/ci_helper.groovy index 9708b1c8..1e724ff7 100644 --- a/jenkins/ci-pipelines/ci_helper.groovy +++ b/jenkins/ci-pipelines/ci_helper.groovy @@ -58,7 +58,7 @@ def lxc_file_push(container_name,file,destination) { def start_http_server(repo_dir,server_name) { sh "docker run -dit --name ${server_name} -v ${repo_dir}:/usr/local/apache2/htdocs/ httpd:2.4" def http_server_ip = sh(returnStdout:true, script: "docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${server_name}").trim() - return "-u http://${http_server_ip}/" + return "http://${http_server_ip}/" } def lxc_get_file(container_name,file,destination) { @@ -75,11 +75,13 @@ def systest_run(container_name, test, source_rc = null) { pre_source = "/tmp/" + source_rc.substring(source_rc.lastIndexOf('/')+1) lxc_file_push(container_name,source_rc,pre_source) - lxc_run(container_name, "sh -c '. ${pre_source}; make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}'") + result = lxc_run(container_name, "sh -c '. ${pre_source}; make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}'") + echo result } else { - lxc_run(container_name, "make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}") + result = lxc_run(container_name, "make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}") + echo result } lxc_get_file(container_name, "/root/devops/systest/reports/pytest-${test}.xml",'.') }