From 32b0b566b3ba3524117740a117fffaf39a165d22 Mon Sep 17 00:00:00 2001 From: Jim Nicholson Date: Tue, 13 Feb 2024 22:57:44 -0800 Subject: [PATCH] Debug --- vars/pythonVenvStage.groovy | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vars/pythonVenvStage.groovy b/vars/pythonVenvStage.groovy index 41192af..75bdfb5 100644 --- a/vars/pythonVenvStage.groovy +++ b/vars/pythonVenvStage.groovy @@ -27,25 +27,32 @@ void call(Map config = [:], Closure body) { stage(runConfig.stepName) { printBanner(runConfig.stepName) if (fileExists(runConfig.venvDir) && runConfig.recreateVenv) { + echo "Removing old venv..." dir(runConfig.venvDir) { deleteDir() } } if (!fileExists(runConfig.venvDir)) { - sh "${runConfig.pythonPath} -m venv ${runConfig.venvDir}" + createVenv = "${runConfig.pythonPath} -m venv ${runConfig.venvDir}" + echo "python create venv cmd is: ${createVenv}" + sh "${createVenv}" } withEnv(venvEnv) { if (runConfig.updatePip) { + echo "Updating pip..." sh "${venvPython} -m pip install --upgrade pip" } if (runConfig.installPipTools) { + echo "Installing pip-tools..." sh "${venvPython} -m pip install pip-tools" } if (fileExists(runConfig.requirementsFile)) { + echo "Collecting requirements ..." sh "pip-compile ${runConfig.requirementsFile}" } + echo "Executing closure..." body() } }