这是我的 gitlab-ci.yml 文件:
image: python:3.6
before_script:
- python --version
- pip install -r requirements.txt
stages:
- test
test:
stage: test
script:
- chmod +x ./scripts/lint.sh
- ./scripts/lint.sh
- chmod +x ./scripts/tests.sh
- ./scripts/tests.sh
请注意,在我的本地机器上,作业运行没有任何问题,并且正在使用 python 3.6.13
在线运行作业测试,我收到此错误:它没有任何意义!
下面是可以运行未标记作业的运行器的配置和错误消息。
您显示的屏幕截图,作业是使用 运行的shell-executor
,因此在您安装了 的任何机器上使用 Python 版本gitlab-runner
。
看起来您想使用docker-executor
for using image: python:3.6
,因此我将重新安装 runner 以使用docker executor。
或者,您可以更新使用 shell 执行器的机器,以使用 Python 3。
另一个问题可能是您没有标记跑步者,并且使用了错误的gitlab-runner
. 确保您已标记您的 shell / docker runners,即使用shell-runner
或docker-runner
,然后在test
作业中添加:
tags:
- docker-runner
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句