带有pythonenv的jenkins管道virtualenv插件

带有pythonenv的jenkins管道virtualenv插件,python,jenkins,virtualenv,pyenv,Python,Jenkins,Virtualenv,Pyenv,在我的定制jenkins管道(之前安装的管道virtualenv插件)上,我尝试了以下代码: withPythonEnv('python3.5') { pysh 'pytest --cucumberjson=result.json testscript.py' } 但在管道的控制台输出中,它仍然以Python2.7平台为目标: pytest——cucumberjson=result.json testscript.py ================测试会话开始==========

在我的定制jenkins管道(之前安装的管道virtualenv插件)上,我尝试了以下代码:

withPythonEnv('python3.5') {
     pysh 'pytest --cucumberjson=result.json testscript.py'
}
但在管道的控制台输出中,它仍然以Python2.7平台为目标:

pytest——cucumberjson=result.json testscript.py

================测试会话开始================

平台linux2--Python 2.7.13,pytest-3.6.3,py-1.5.4,pluggy-0.6.0

另一方面,我使用Python3.5的venv在pycharm中运行相同的py.test:

平台linux--Python 3.5.3,pytest-3.6.2,py-1.5.3,pluggy-0.6.0

有什么建议吗

提前感谢,,
这也让我有一段时间感到困惑。pyenv管道插件似乎不理解pyenv别名/名称,但它可以理解环境的路径。在您的情况下,如果假设您的env安装在
/root/.pyenv/versions/3.5.3/envs/myenv\u 3\u 5\u 3
,则应该可以:

withPythonEnv('/root/.pyenv/versions/3.5.3/envs/myenv_3_5_3/bin/python') {
   pysh 'pytest --cucumberjson=result.json testscript.py'
}

您好,我是pyenv管道插件的创建者。我最近发布了一个新版本,希望您可以尝试一下,看看它是否能解决您的问题。否则,请在Github项目中打开一个问题:@BenKalender我想我仍然有相同的问题。你有什么最新消息吗?