X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=44b8d7664a28c703b04003e22a35ab117d07113e;hb=refs%2Fheads%2Fmulti_stack;hp=083d11df8882ba294dba558e37a3611784470aa1;hpb=f3b64c988d3e23ee06c6b40e64001e77ac632559;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 083d11df..44b8d766 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -40,6 +40,14 @@ properties([ ]) ]) +def uninstall_osm(stackName) { + sh """ + export OSM_USE_LOCAL_DEVOPS=true + export PATH=$PATH:/snap/bin + installers/full_install_osm.sh -y -s ${stackName} --test --nolxd --nodocker --nojuju --nohostports --nohostclient --uninstall + """ +} + node("${params.NODE}") { sh 'env' @@ -179,8 +187,8 @@ node("${params.NODE}") { } sh """ - export OSM_USE_LOCAL_DEVOPS=true - installers/full_install_osm.sh -y -s ${container_name} --nolxd --nodocker --nojuju --nohostports \ + export PATH=$PATH:/snap/bin + installers/full_install_osm.sh -y -s ${container_name} --test --nolxd --nodocker --nojuju --nohostports --nohostclient \ ${commit_id} \ ${repo_distro} \ ${repo_base_url} \ @@ -234,17 +242,18 @@ node("${params.NODE}") { } finally { sh "docker stop ${http_server_name}" + sh "docker rm ${http_server_name}" if ( params.DO_INSTALL ) { if (error) { if ( !params.SAVE_CONTAINER_ON_FAIL ) { - sh "lxc delete ${container_name} --force" + uninstall_osm container_name } throw error } else { if ( !params.SAVE_CONTAINER_ON_PASS ) { - sh "lxc delete ${container_name} --force" + uninstall_osm container_name } } }