Change-Id: Icea51817f0c0815ada1abd4ff8690ec0b4b03b5a
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
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"
+ }
}
}
}