From 2eac580110461e4231e410687563cd0e9fc64e21 Mon Sep 17 00:00:00 2001 From: Jim Nicholson Date: Tue, 13 Feb 2024 23:07:08 -0800 Subject: [PATCH] More debugging --- vars/pythonVenvStage.groovy | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/vars/pythonVenvStage.groovy b/vars/pythonVenvStage.groovy index 75bdfb5..1d18b54 100644 --- a/vars/pythonVenvStage.groovy +++ b/vars/pythonVenvStage.groovy @@ -27,7 +27,7 @@ void call(Map config = [:], Closure body) { stage(runConfig.stepName) { printBanner(runConfig.stepName) if (fileExists(runConfig.venvDir) && runConfig.recreateVenv) { - echo "Removing old venv..." + echo 'Removing old venv...' dir(runConfig.venvDir) { deleteDir() } @@ -36,23 +36,26 @@ void call(Map config = [:], Closure body) { if (!fileExists(runConfig.venvDir)) { createVenv = "${runConfig.pythonPath} -m venv ${runConfig.venvDir}" echo "python create venv cmd is: ${createVenv}" - sh "${createVenv}" + sh createVenv } withEnv(venvEnv) { if (runConfig.updatePip) { - echo "Updating pip..." - sh "${venvPython} -m pip install --upgrade pip" + updateCmd = "${venvPython} -m pip install --upgrade pip" + echo "Updating pip with (${updateCmd})" + sh updateCmd } if (runConfig.installPipTools) { - echo "Installing pip-tools..." - sh "${venvPython} -m pip install pip-tools" + installCmd = "${venvPython} -m pip install pip-tools" + echo "Installing pip-tools with (${installCmd})" + sh installCmd } if (fileExists(runConfig.requirementsFile)) { - echo "Collecting requirements ..." - sh "pip-compile ${runConfig.requirementsFile}" + reqCmd = "pip-compile ${runConfig.requirementsFile}" + echo "Collecting requirements with (${reqCmd})" + sh reqCmd } - echo "Executing closure..." + echo 'Executing closure...' body() } }