【发布时间】:2018-07-05 13:40:49
【问题描述】:
在我的自定义 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
另一方面,我在 pycharm 中使用 Python3.5 的 venv 运行相同的 py.test:
平台 linux -- Python 3.5.3、pytest-3.6.2、py-1.5.3、pluggy-0.6.0
有什么建议吗?
提前致谢, 问候
【问题讨论】:
-
大家好,我是pyenv-pipeline-plugin的创建者。我最近发布了一个新版本,希望你能尝试一下,看看它是否能解决你的问题。否则,请在 Github 项目中打开一个 issue:github.com/jenkinsci/pyenv-pipeline-plugin
-
@BenKalender 我想我仍然有同样的问题。你有什么更新吗?
标签: python jenkins virtualenv pyenv