如何使gitlab的激活特定运行器工作?

Zat*_*ion 4 gitlab gitlab-ci gitlab-ci-runner

我的工作正在等待并得到以下信息:

此作业卡住了,因为您没有任何可以运行此作业的活动跑步者.

卡住

但我确实为这个项目提供了一个激活的跑步者:

活性

跑步者在我的一个vps中作为docker安装:

在此输入图像描述

在此输入图像描述

以下是此跑步者的配置:

concurrent = 1 check_interval = 0

[[runners]]
  name = "ansible"
  url = "https://gitlab.com/"
  token = "xxx"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "registry.cn-hangzhou.aliyuncs.com/artwater/ansible:latest"
    privileged = false
    disable_cache = false
    volumes = ["/cache"]
  [runners.cache]
Run Code Online (Sandbox Code Playgroud)

下面是我的gitlab-ci.yml:

stages:
  - build
  - production

job_build:
  stage: build
  script:
    - ansible-playbook -i ./ansible/hosts/production.yml --extra-vars "version=$CI_BUILD_TAG" ./ansible/build.yml
  only:
    - tags

job_production:
  stage: production
  script:
    - ansible-playbook -i ./ansible/hosts/production.yml --extra-vars "version=$CI_BUILD_TAG" ./ansible/deploy.yml
  only:
    - tags
  when: on_success
Run Code Online (Sandbox Code Playgroud)

谁能告诉我怎么能让这个跑步者工作?非常感谢!

loo*_*omi 6

您似乎需要为使用您的跑步者的项目指定相应的标签(例如,在您的示例中为ansible)或者让跑步者不检查标签:运行未标记的作业(至少对于共享的跑步者)