X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=44b8d7664a28c703b04003e22a35ab117d07113e;hb=refs%2Fheads%2Fmulti_stack;hp=d7b37655a75ebc8272eda95861187d3ec72eeb36;hpb=bf47e150aa877a0525cf30fb633f613dae6feb3b;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index d7b37655..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,9 +187,8 @@ node("${params.NODE}") { } sh """ - export OSM_USE_LOCAL_DEVOPS=true export PATH=$PATH:/snap/bin - installers/full_install_osm.sh -y -s ${container_name} --nolxd --nodocker --nojuju --nohostports \ + installers/full_install_osm.sh -y -s ${container_name} --test --nolxd --nodocker --nojuju --nohostports --nohostclient \ ${commit_id} \ ${repo_distro} \ ${repo_base_url} \ @@ -235,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 } } }