持续集成 Python 持续集成构建失败 ERROR: file not found: test_xxx.py

猫大白 · 2019年03月20日 · 最后由 猫大白 回复于 2019年04月08日 · 1862 次阅读

环境:Jenkins 安装在 Docker 中,我已经在那台主机上安装了 Python3 的环境了

Jenkins 配置如下:
构建环境:
SSH site: root@x.x.x.x:22
Pre build script:

docker exec -it jenkins bash
cd /var/jenkins_home/workspace/PyCITest
py.test test_DeviceReboot.py --resultlog=./log.txt

构建报错:
[SSH] executing pre build script:

docker exec -it jenkins bash
cd /var/jenkins_home/workspace/PyCITest
py.test test_DeviceReboot.py --resultlog=./log.txt
the input device is not a TTY
bash: line 2: cd: /var/jenkins_home/workspace/PyCITest: No such file or directory
ERROR: file not found: test_DeviceReboot.py

有亲可以提供一下方向吗

共收到 6 条回复 时间 点赞

cd: /var/jenkins_home/workspace/PyCITest 这个·命令能执行成功么?

docker exec -it jenkins bash 执行这个命令后,提示 the input device is not a TTY。

我去催饭 回复

找不到这个路径

猫大白 回复

都提示你了,这路径下,没有这个指定的文件。

ovwane 回复

是的,访问不到 Jenkins docker,我在 Linux 主机那边执行 docker exec -it jenkins bash 是可以的

我去催饭 回复

因为我访问不到 docker,就是想请教怎么访问到容器,那个路径是在 docker 里面的

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册