如何在gitlab-ci运行期间修复“无此文件或目录”

时间:2019-10-17 11:24:51

标签: gitlab gitlab-ci

我刚刚为gitlab-ci配置了一个运行器,并将模板bash ci任务运行为:

# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options

# you can delete this line if you're not using Docker
#image: busybox:latest

before_script:
  - echo "Before script section"
  - echo "For example you might run an update here or install a build dependency"
  - echo "Or perhaps you might print out some debugging details"

after_script:
  - echo "After script section"
  - echo "For example you might do some cleanup here"

build1:
  stage: build
  script:
    - echo "Do your build here"

test1:
  stage: test
  script:
    - echo "Do a test here"
    - echo "For example run a test suite"

test2:
  stage: test
  script:
    - echo "Do another parallel test here"
    - echo "For example run a lint test"

deploy1:
  stage: deploy
  script:
    - echo "Do your deploy here"

但是工作失败了:

enter image description here

我登录到跑步机,发现所需位置下只有一个$ {projectname} .tmp文件夹

enter image description here

我错过了什么吗?

2 个答案:

答案 0 :(得分:2)

最终发现这是gitlab-runner和Debian / Buster的错误,注释掉.bash_logout上的/home/gitlab-runner文件将解决此问题

此处是the discussion,以帮助其他遇到相同问题的人

答案 1 :(得分:0)

我遇到了类似的问题,但是我的问题是由cdebootstrap

引起的

要解决我使用的问题:

stable ./debian-minbase http://deb.debian.org/debian/ 

希望这个答案很有用。

您还可以使用:sudo find / -name "mk-prebuilt-images.sh"

最终将发现:

/usr/lib/gitlab-runner/mk-prebuilt-images.sh