How do I make an activated specific gitlab runner work?

My work is pending and appears below the message:

This task gets stuck because you have no active members who can complete this task.

stuck

But I 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 configuration 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 someone please let me know how I can get this runner to work? Many thanks!

+3


source to share


3 answers


It seems that you need to either specify for the project that your runner is using the appropriate tag (like in your example), or enable the runner so it doesn't check for tags: run untagged assignments (at least for general members)



+5


source


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



+1


source


If you have problems with gitlab-runner try following command to debug. You will get more information about where things go wrong.

sudo gitlab-runner -debug run

      

Mental tags are in the pipeline if the runner is not an untagged type and you can edit the runner config in the gitlab creeping edit form.

In particular, the runner checks the work; someday the runner's task will be pending because it cannot detect work.

Once the debug job is started, the command line starts quickly if the configuration is correct.

0


source







All Articles