More debugging

This commit is contained in:
Jim Nicholson 2024-02-13 23:07:08 -08:00
parent 32b0b566b3
commit 2eac580110

View File

@ -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()
}
}