projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid deleting of lxc container when not installing
[osm/devops.git]
/
jenkins
/
ci-pipelines
/
ci_stage_3.groovy
diff --git
a/jenkins/ci-pipelines/ci_stage_3.groovy
b/jenkins/ci-pipelines/ci_stage_3.groovy
index
52aa3b2
..
2e2bf08
100644
(file)
--- a/
jenkins/ci-pipelines/ci_stage_3.groovy
+++ b/
jenkins/ci-pipelines/ci_stage_3.groovy
@@
-235,15
+235,17
@@
node("${params.NODE}") {
finally {
sh "docker stop ${http_server_name}"
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"
+ }
}
}
}
}
}
}