首页 > 解决方案 > 如何在 gitlab-ci 运行期间修复“没有这样的文件或目录”

问题描述

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

# 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"

但这项工作失败了:

在此处输入图像描述

而且我登录了runner机器,发现想要的位置下只有一个${projectname}.tmp文件夹

在此处输入图像描述

我错过了什么?

标签: gitlabgitlab-ci

解决方案


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

这是对这个问题的讨论,以帮助其他遇到相同问题的人


推荐阅读