Use*_*219 3 gitlab gitlab-ci gitlab-ci-runner
我为单个项目配置了一个 gitlab 运行程序。我看到的问题是,跑步者不会等到前一个作业完成,而是在与前一个作业相同的目录中进行签出,并踩踏所有内容。我已经运行了一项工作,然后另一项开发提交,从而开始了另一项工作。为什么我不能将管道配置为不运行,以免损坏已运行的工作区?
这是两个作业的日志(唯一的区别是时间戳)
[0K] Running with gitlab-runner 12.6.0 (ac8e767a)
[0K] on gitlab.xxxx.com rz8RmGp4
[0K] section_start:1578357551:prepare_executor
[0K] Using Docker executor with image my-image-build ...
[0K] Using locally found image version due to if-not-present pull policy
[0K] Using docker image sha256:xxxxxxxxxx for my-image-build ...
[0;msection_end:1578357553:prepare_executor
[0Ksection_start:1578357553:prepare_script
[0K] Running on runner-rz8RmGp4-project-23-concurrent-0 via gitlab.xxxx.com...
section_end:1578357554:prepare_script
[0K] section_start:1578357554:get_sources
[0K[32;1mFetching changes with git depth set to 50...[0;m
Initialized empty Git repository in /builds/my-project/.git/
<proceeds to checkout and stomp over the already running runner>
Run Code Online (Sandbox Code Playgroud)
我看到的主要问题是它们都签出到Initialized empty Git repository in /builds/my-project/.git/导致问题的同一目录。
小智 5
您可以使用resource_group来阻止作业并行运行。
例如
Job 1:
stage: My Stage
resource_group: stage-wedge
...
Job 2:
stage: My Stage
resource_group: stage-wedge
...
Run Code Online (Sandbox Code Playgroud)
在上面的示例中,作业 2 将在作业 1 完成后运行。
| 归档时间: |
|
| 查看次数: |
6271 次 |
| 最近记录: |