File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed
Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ def deployDocs() {
147147}
148148
149149def cleanup () {
150- sh " ${ ACTIVATE} && make clean"
151- sh " rm -rf ${ conda_env_path} "
152150 cleanWs()
153151 dir(" ${ WORKSPACE} @tmp" ) {
154152 deleteDir()
Original file line number Diff line number Diff line change @@ -161,7 +161,17 @@ def call(Map config = [:]){
161161 }
162162 } finally {
163163 // Cleanup
164- buildStages. cleanup()
164+ script {
165+ if (params. DEBUG ) {
166+ echo ' Debug was enabled - MANUALLY CLEAN UP WHEN FINISHED.'
167+ } else {
168+ // Clean up the conda envs
169+ sh " ${ ACTIVATE} && make clean"
170+ sh " rm -rf ${ conda_env_path} "
171+
172+ buildStages. cleanup()
173+ }
174+ }
165175 }
166176 }
167177 }
@@ -205,7 +215,7 @@ def call(Map config = [:]){
205215 slackMessage + = """
206216
207217 Debug was enabled - MANUALLY CLEAN UP WHEN FINISHED.
208- 1. Env path: ${ env.CONDA_ENV_PATH }
218+ 1. Env path: ${ conda_env_dir } / ${ conda_env_name }
209219 2. Workspace: ${ env.WORKSPACE}
210220 """ . stripIndent()
211221 }
@@ -232,17 +242,7 @@ def call(Map config = [:]){
232242 }
233243 }
234244 cleanup { // cleanup for outer workspace
235- script {
236- if (params. DEBUG ) {
237- echo ' Debug was enabled - MANUALLY CLEAN UP WHEN FINISHED.'
238- } else {
239- cleanWs()
240- // manually remove @tmp dirs
241- dir(" ${ WORKSPACE} @tmp" ){
242- deleteDir()
243- }
244- }
245- }
245+ buildStages. cleanup()
246246 }
247247 } // End of post
248248 } // End of pipeline
You can’t perform that action at this time.
0 commit comments