Debug
This commit is contained in:
parent
5ec93d5a46
commit
32b0b566b3
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user