From d76246d7819355c1ccc3f7727dd41f8bbe634fdc Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Mon, 27 Mar 2023 09:42:04 +0200 Subject: [PATCH] dockerExecuteOnKubernetes: return result of body closure (#4301) --- vars/dockerExecuteOnKubernetes.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vars/dockerExecuteOnKubernetes.groovy b/vars/dockerExecuteOnKubernetes.groovy index d5d19f26ec..a58c6278f6 100644 --- a/vars/dockerExecuteOnKubernetes.groovy +++ b/vars/dockerExecuteOnKubernetes.groovy @@ -331,10 +331,11 @@ void executeOnPod(Map config, utils, Closure body, Script script) { echo "invalidate stash workspace-${config.uniqueId}" stash name: "workspace-${config.uniqueId}", excludes: '**/*', allowEmpty: true } - body() + def result = body() if (config.verbose) { lsDir('Directory content after body execution') } + return result } finally { stashWorkspace(config, 'container', true, true) }