【问题标题】:GitLab CI runner doesn't buildGitLab CI runner 无法构建
【发布时间】:2015-10-07 08:42:59
【问题描述】:

我刚刚按照文档 https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md 安装了 gitlab-ci-multi-runner

我使用公共服务器 ci.gitlab.com 并且跑步者的注册似乎没问题(跑步者出现绿灯)。 激活调试后,我可以看到运行器定期获取 CI 服务器。

但是当一个新的提交被推送时,没有构建完成。 一切都是绿色的:https://ci.gitlab.com/projects/4656 但没有进行任何测试...

我的 .gitlab-ci.yml 非常简单:

before_script:
  - apt install python3-pip
  - pip3 install -q -r requirements.txt
master:
  script: "make test"
  only:
    - master
script:
  - python setup.py test

顺便说一句,我可以找到任何错误消息,但我不知道在哪里搜索。

我对 CI 非常了解,我可能缺少一个明显的点。

【问题讨论】:

  • rspec:python setup.py 测试
  • 对于那些在家关注的人 (hi!),- apt install python3-pip 应该改为 - apt-get install -y python3-pip。也就是说,python:3 Docker 映像不应该已经为您提供了此依赖项吗?

标签: gitlab gitlab-ci gitlab-ci-runner


【解决方案1】:

试试这个。这是假设您的 pyunit 测试位于工作目录中名为 runtests.py 的文件中。

before_script:
  - apt install python3-pip
  - pip3 install -q -r requirements.txt

master:
  script: "python runtests.py"
  only:
    - master

【讨论】:

  • 脚本部分实际上是不相关的。谢谢!
  • 很高兴我能帮上忙。我自己上周才开始使用它。了解你的意图:) 一旦你掌握了它的窍门,它就非常简单。
猜你喜欢
  • 2017-06-10
  • 1970-01-01
  • 2016-02-25
  • 1970-01-01
  • 2019-05-20
  • 2016-08-02
  • 1970-01-01
  • 2016-01-12
  • 1970-01-01
相关资源
最近更新 更多