【发布时间】:2020-05-14 07:42:39
【问题描述】:
我设置了新的 gitlab docker ,然后基于 microsoft/dotnet:latest 设置了一个带有 docer 执行器的 runner docker 然后我在 gitlab 中添加了一个简单的项目,只是一个 dotnet core hello world 然后我创建一个 ci 文件如下:
image: microsoft/dotnet:latest
stages:
- build
variables:
project: "ConsoleApp"
before_script:
- "dotnet restore"
build:
stage: build
variables:
build_path: "$ConsoleApp"
script:
- "cd $build_path"
- "dotnet build"
然后在管道中我得到这个输出:
Preparing environment
Running on runner-vtysysr-project-2-concurrent-0 via e189cc9d1c60...
Getting source from Git repository
00:07
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/root/gitlabcitest/.git/
fatal: couldn't find remote ref refs/pipelines/18
Uploading artifacts for failed job
00:06
ERROR: Job failed: exit code 1
我搜索错误,但所有的答案都是关于有分支的项目,但我没有任何分支,只是一个简单的 hello world 项目。
【问题讨论】:
-
我也有类似的问题。我正在使用 Gitlab 自己的 CI README。我开了一个赏金。
-
嗨,我的问题是在运行器 docker 中的 ssh 配置中,在将 ssh 密钥添加到 docker 问题解决后
-
好收获。我已将您的评论包含在答案中以提高知名度。
-
@alikamrani 您能否详细说明您的问题是什么以及您如何解决它
标签: docker continuous-integration gitlab-ci gitlab-ci-runner