【发布时间】:2019-09-06 09:52:09
【问题描述】:
我正在尝试在 gitlab 存储库上设置持续集成。
我添加了以下gitlab-ci.yml 文件:
stages:
- test
test:
image: python:3.7
script:
- python -v
tags:
- python
在 gitlab 上,在 settings->CI / CD 中,我已按照“手动设置特定 Runner”中的说明进行操作。在'please enter the executor:'这一步中,我输入了'shell'。
当我尝试提交上述yml 文件时,运行器开始运行,尽管它随后给出以下错误消息:
Running with gitlab-runner 11.9.2 (fa86510e)
on wsf-1102 HUx_zvP8
Using Shell executor...
Running on WSF-1102...
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
Fetching changes...
Clean repository
From [my_repo]
e327c9f..2f0e41f [my_branch]-> origin/[my_branch]
Checking out 2f0e41f1 as [my_branch]...
Skipping Git submodules setup
$ python -v
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Job failed: exit status 9009
我应该如何正确编写yml 文件,以便我可以使用python 作为稍后运行test.py 文件的命令?
【问题讨论】:
标签: python git gitlab gitlab-ci gitlab-ci-runner