Fix issue with PATH in venv
This commit is contained in:
parent
178122d4f6
commit
ae067bf6c0
@ -21,7 +21,7 @@ void call(Map config = [:], Closure body) {
|
|||||||
|
|
||||||
venvEnv = [
|
venvEnv = [
|
||||||
"VIRTUAL_ENV=${venvDir.join('/')}",
|
"VIRTUAL_ENV=${venvDir.join('/')}",
|
||||||
"PATH=${venvBinDir.join('/')}"
|
"PATH+CUSTOM=${venvBinDir.join('/')}"
|
||||||
]
|
]
|
||||||
|
|
||||||
stage(runConfig.stepName) {
|
stage(runConfig.stepName) {
|
||||||
@ -43,23 +43,21 @@ void call(Map config = [:], Closure body) {
|
|||||||
if (runConfig.updatePip) {
|
if (runConfig.updatePip) {
|
||||||
updateCmd = "${venvPython.join('/')} -m pip install --upgrade pip"
|
updateCmd = "${venvPython.join('/')} -m pip install --upgrade pip"
|
||||||
echo "Updating pip with (${updateCmd})"
|
echo "Updating pip with (${updateCmd})"
|
||||||
sh """
|
echo "Environment is ${venvEnv}"
|
||||||
env
|
sh updateCmd
|
||||||
${updateCmd}
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
// if (runConfig.installPipTools) {
|
if (runConfig.installPipTools) {
|
||||||
// installCmd = "${venvPython.join('/')} -m pip install pip-tools"
|
installCmd = "${venvPython.join('/')} -m pip install pip-tools"
|
||||||
// echo "Installing pip-tools with (${installCmd})"
|
echo "Installing pip-tools with (${installCmd})"
|
||||||
// sh installCmd
|
sh installCmd
|
||||||
// }
|
}
|
||||||
// if (fileExists(runConfig.requirementsFile)) {
|
if (fileExists(runConfig.requirementsFile)) {
|
||||||
// reqCmd = "pip-compile ${runConfig.requirementsFile}"
|
reqCmd = "pip-compile ${runConfig.requirementsFile}"
|
||||||
// echo "Collecting requirements with (${reqCmd})"
|
echo "Collecting requirements with (${reqCmd})"
|
||||||
// sh reqCmd
|
sh reqCmd
|
||||||
// }
|
}
|
||||||
// echo 'Executing closure...'
|
echo 'Executing closure...'
|
||||||
// body()
|
body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user