More debugging
This commit is contained in:
parent
32b0b566b3
commit
2eac580110
@ -27,7 +27,7 @@ void call(Map config = [:], Closure body) {
|
|||||||
stage(runConfig.stepName) {
|
stage(runConfig.stepName) {
|
||||||
printBanner(runConfig.stepName)
|
printBanner(runConfig.stepName)
|
||||||
if (fileExists(runConfig.venvDir) && runConfig.recreateVenv) {
|
if (fileExists(runConfig.venvDir) && runConfig.recreateVenv) {
|
||||||
echo "Removing old venv..."
|
echo 'Removing old venv...'
|
||||||
dir(runConfig.venvDir) {
|
dir(runConfig.venvDir) {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
@ -36,23 +36,26 @@ void call(Map config = [:], Closure body) {
|
|||||||
if (!fileExists(runConfig.venvDir)) {
|
if (!fileExists(runConfig.venvDir)) {
|
||||||
createVenv = "${runConfig.pythonPath} -m venv ${runConfig.venvDir}"
|
createVenv = "${runConfig.pythonPath} -m venv ${runConfig.venvDir}"
|
||||||
echo "python create venv cmd is: ${createVenv}"
|
echo "python create venv cmd is: ${createVenv}"
|
||||||
sh "${createVenv}"
|
sh createVenv
|
||||||
}
|
}
|
||||||
|
|
||||||
withEnv(venvEnv) {
|
withEnv(venvEnv) {
|
||||||
if (runConfig.updatePip) {
|
if (runConfig.updatePip) {
|
||||||
echo "Updating pip..."
|
updateCmd = "${venvPython} -m pip install --upgrade pip"
|
||||||
sh "${venvPython} -m pip install --upgrade pip"
|
echo "Updating pip with (${updateCmd})"
|
||||||
|
sh updateCmd
|
||||||
}
|
}
|
||||||
if (runConfig.installPipTools) {
|
if (runConfig.installPipTools) {
|
||||||
echo "Installing pip-tools..."
|
installCmd = "${venvPython} -m pip install pip-tools"
|
||||||
sh "${venvPython} -m pip install pip-tools"
|
echo "Installing pip-tools with (${installCmd})"
|
||||||
|
sh installCmd
|
||||||
}
|
}
|
||||||
if (fileExists(runConfig.requirementsFile)) {
|
if (fileExists(runConfig.requirementsFile)) {
|
||||||
echo "Collecting requirements ..."
|
reqCmd = "pip-compile ${runConfig.requirementsFile}"
|
||||||
sh "pip-compile ${runConfig.requirementsFile}"
|
echo "Collecting requirements with (${reqCmd})"
|
||||||
|
sh reqCmd
|
||||||
}
|
}
|
||||||
echo "Executing closure..."
|
echo 'Executing closure...'
|
||||||
body()
|
body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user