Skip to content
Snippets Groups Projects
Commit 1f405cf6 authored by Mike Marchetti's avatar Mike Marchetti
Browse files

Avoid deleting of lxc container when not installing


Change-Id: Icea51817f0c0815ada1abd4ff8690ec0b4b03b5a
Signed-off-by: default avatarMike Marchetti <mmarchetti@sandvine.com>
parent 515503e2
No related branches found
No related tags found
No related merge requests found
......@@ -235,15 +235,17 @@ node("${params.NODE}") {
finally {
sh "docker stop ${http_server_name}"
if (error) {
if ( !params.SAVE_CONTAINER_ON_FAIL ) {
sh "lxc delete ${container_name} --force"
if ( params.DO_INSTALL ) {
if (error) {
if ( !params.SAVE_CONTAINER_ON_FAIL ) {
sh "lxc delete ${container_name} --force"
}
throw error
}
throw error
}
else {
if ( !params.SAVE_CONTAINER_ON_PASS ) {
sh "lxc delete ${container_name} --force"
else {
if ( !params.SAVE_CONTAINER_ON_PASS ) {
sh "lxc delete ${container_name} --force"
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment