X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=e5da90161a27a0ff435a56e045a9f5026a9d70c2;hb=b7c442c64ecc44e811c322b9b5f0851802073d8e;hp=0b6dbc08a394c0ef8dbfa707139825f510bb3e5c;hpb=dd102f6c4afaca367a5731dbbd71eeccc019e822;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 0b6dbc08..e5da9016 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} --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} } } }