Gitlab Runner 删除 dist 文件夹

Gitlab Runner removes dist folder

我在 windows 上使用 gitlab runner 并且 runner 在我的部署阶段被调用之前删除了我的工件

Running with gitlab-runner 10.7.1 (b9bba623)
  on Gitlab runner 8953950b
Using Shell executor...
Running on DZIVOPC...
Fetching changes...
Removing dist/
Removing node_modules/

为什么会这样。

来自文档

工件:

You can only use paths that are within the project workspace. To pass artifacts between different jobs, see dependencies.

然后在依赖项中:

Note that artifacts from all previous stages are passed by default.

我已经尝试过使用和不使用缓存以及使用和不使用缓存。 仍然没有 :)

在你的gitlab末尾添加-ci:

cache:
  untracked: true

其实问题出在

cache_dir 变量。它在较新版本中已重命名,因此未设置。