0

我在专用 YAML 文件上定义了一个单独的 GitLab 管道np-pipeline.yml。然后我从另一个具有以下trigger功能的手动作业中调用它:

job:manual:new-np:
  trigger:
    include: .gitlab-ci/np-pipeline.yml
  when: manual

我基本上遵循了这里的文档:https ://docs.gitlab.com/ee/ci/pipelines/pipeline_architectures.html#child--parent-pipelines

但是我无法运行整个子管道。问题在于流程图像中下方的琥珀色图标。子管道流中的第一个作业被此消息卡住:

这项工作被卡住了,因为该项目没有在线分配任何跑步者。转到项目 CI 设置

父/子流程概览:

父/子流

我在我拥有的虚拟机中配置了一个自托管gitlab-runner,该虚拟机在我管理的各种 GitLab 项目(存储库)和组中注册。

当我转到存储库(项目)CI 设置时,我看不到任何可用于注册另一个 GitLab 运行器的新令牌。

我已经使用类似于以下命令的命令注册了一个项目运行器:

gitlab-runner register \
    --non-interactive \
    --url "https://gitlab.com/" \
    --registration-token "MY_TOKEN" \
    --description "devops runner, using MY_TOKEN token" \
    --tag-list "my_devops, MY_TOKEN" \
    --executor "shell"

我还用单独的令牌注册了一些团体跑步者,但是当我

  1. 进入 GitLab 网站项目页面
  2. 然后单击左侧面板上的“设置”
  3. 然后点击“CI/CD”
  4. 然后展开“Runners”部分:

它们不会出现在可用令牌的项目列表中。我只能看到我用上面的命令注册的一个项目运行器。

  • 如何在带有 GitLab 运行器的自托管 CI VM 中运行此 CI 父/子管道?
  • 我想使用shell跑步者(没有码头或其他任何东西)
  • 我有一个相当大的虚拟机用于 CI 工作,所以我想看看是否有办法在同一个虚拟机中拥有多个跑步者。

单独的子管道供参考:

job-np-queues:
  script: 
    - echo "DO THINGS"
  timeout: 40m

job-np-endpoint-api:
  needs: [job-np-queues]
  script: 
    - echo "DO THINGS"
  timeout: 20m

job-np-partner-api:
  needs: [job-np-queues]
  script: 
    - echo "DO THINGS"
  timeout: 20m

job-np-apisnapshot-blob:
  needs: [job-np-queues]
  script: 
    - echo "DO THINGS"
  timeout: 15m

job-integration-tests-apis:
  needs: [job-np-endpoint-api, job-np-partner-api, job-np-apisnapshot-blob]
  script: 
    - echo "DO THINGS"
  timeout: 30m
  retry:
    max: 1


job-acceptance-tests-apis:
  needs: [job-integration-tests-apis]
  script:
    - echo "DO THINGS"
  timeout: 20m
  retry:
    max: 1

4

0 回答 0