【问题标题】:Gitlab CI: Why does the same job have different results when re-running it?Gitlab CI:为什么相同的作业重新运行时会出现不同的结果?
【发布时间】:2018-02-10 09:55:30
【问题描述】:

我有一个 Gitlab CI 工作,以前可以工作,但现在不行了。

第一次:https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51703707
第二次:https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51949626

docker镜像完全一样。在这两种情况下,$CI_COMMIT_TAG 都设置为 4.14。但第二次失败:git pull origin rpi-$CI_COMMIT_TAG.y.
*** Please tell me who you are.

为什么会发生这种情况?我的意思是git版本必须相同,因为它是相同的docker镜像。

这是 ci 脚本的相关部分:

- export KERNEL=kernel7
- cd /tools
- git pull
- cd /linux
- git checkout rpi-$CI_COMMIT_TAG.y
- git pull origin rpi-$CI_COMMIT_TAG.y # suddenly fails...

【问题讨论】:

    标签: git continuous-integration gitlab gitlab-ci


    【解决方案1】:

    您的本地分支无法快速转发到 origin 上的分支,因此 git 尝试合并。合并会创建提交,因此需要配置用户并且失败。你可以试试git checkout origin/branch

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-17
      • 2020-01-28
      • 2013-11-19
      • 2018-05-02
      • 2021-11-09
      相关资源
      最近更新 更多