File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ def runDebugInfo() {
2727
2828 // Display environment variables from Jenkins.
2929 echo """ Environment:
30+ NODE_NAME: '${ NODE_NAME} '
31+ EXECUTOR_NUMBER: '${ EXECUTOR_NUMBER} '
3032 ACTIVATE: '${ ACTIVATE} '
3133 BUILD_NUMBER: '${ BUILD_NUMBER} '
3234 BRANCH: '${ BRANCH} '
Original file line number Diff line number Diff line change @@ -161,7 +161,13 @@ 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+ buildStages. cleanup()
169+ }
170+ }
165171 }
166172 }
167173 }
@@ -201,6 +207,14 @@ def call(Map config = [:]){
201207 Author: @${ slackID}
202208 Build details: <${ env.BUILD_URL} /console|See in web console>
203209 """ . stripIndent()
210+ if (params. DEBUG ) {
211+ slackMessage + = """
212+
213+ Debug was enabled - MANUALLY CLEAN UP WHEN FINISHED.
214+ 1. Env path: ${ conda_env_dir} /${ conda_env_name}
215+ 2. Workspace: ${ env.WORKSPACE}
216+ """ . stripIndent()
217+ }
204218 }
205219 }
206220 failure {
@@ -224,6 +238,7 @@ def call(Map config = [:]){
224238 }
225239 }
226240 cleanup { // cleanup for outer workspace
241+ // NOTE: We always clean up this outer workspace regardless of DEBUG
227242 cleanWs()
228243 // manually remove @tmp dirs
229244 dir(" ${ WORKSPACE} @tmp" ){
You can’t perform that action at this time.
0 commit comments