How to make the activated specific runner of gitlab working?

12,943

Solution 1

It seems that you need to either specify for the project which uses your runner the respective tag (e.g. ansible in your example) or enable the runner to not check tags: Run untagged jobs (at least for shared runners)

Solution 2

Try the untagged run. Go to the specific runner configuration in GitLab instance and check "Run untagged jobs" and resubmit the pipeline.

Share:
12,943
Zation
Author by

Zation

Focus on javascript and html5

Updated on June 19, 2022

Comments

  • Zation
    Zation almost 2 years

    My job is pending and get below message:

    This job is stuck, because you don't have any active runners that can run this job.

    stuck

    But I do have an activated runner available for this project:

    active

    The runner is installed as docker in one of my vps:

    enter image description here

    enter image description here

    Below is the config for this runner:

    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]
    

    below is my 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
    

    Can anyone please let me know how can I make this runner working? Thanks a lot!

    • loomi
      loomi about 7 years
      This seems to be a problem introduced with GitLab 9.0, we experience the same problem after update on a local installation. Further do we see the problem also with enabled shared runners.
    • loomi
      loomi about 7 years
      Crosslink to Issue on GitLab: gitlab.com/gitlab-org/gitlab-ce/issues/29928
  • Apocatastasis
    Apocatastasis about 4 years
    How do you specify project's tags?