Activated specific runner is not working

Hello gitlab-community!

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.

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

below is the detail page of the runner

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

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!

Can you check / screenshot the private runner’s details page? When was the last contact with the runner according to Gitlab?

Hi stefanvangastel,

Thanks for your reply!
Below is the detail page of the runner:

Can run untagged jobs: no and you have a tag ansible for this runner.

Your jobs don’t have any tags specified, you should try to add a tag to the jobs:

stages:
  - build
  - production

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

job_production:
  stage: production
  tags:
    - ansible
  script:
    - ansible-playbook -i ./ansible/hosts/production.yml --extra-vars "version=$CI_BUILD_TAG" ./ansible/deploy.yml
  only:
    - tags
  when: on_success
1 Like

Thanks stefanvangastel! You save my life! It’s working now.

Happy to help :wink:

1 Like

You guys should update the documentation for this, as it currently makes no mention of the “run_untagged” option and implies that tagged runners will pick up untagged jobs (which also seems to have been the default before https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/438).

1 Like

You helped me as well :smiley: thanks a lot :smiley:

I taged specific runner in Stages but still pipelines in pending status. Verified runner and are live status. I not able to debug where things going wrong. please help.

this is gold, thank you so much for saving my time

Hello, did you get to your runners to pick up jobs? I have the same problem and setting tags on the gitlab-ci.yml doesn’t fix it for me either.

Hello gitlab-community!

image: alpine:latest

stages:

  • build
  • test
  • deploy

before_script:

  • apk update
  • apk add maven

build:
stage: build
tags:
- runner
script:
- echo “Building your application…”
- cd /builds/web/ott-aggregation-collection/backend-development/ott-aggregation_backend
- mvn clean package
artifacts:
paths:
- /target/test/
test:
stage: test
tags:
- runner
script:
- echo “Running unit tests…”
#- k6 run <test_script.js>

deploy:
stage: deploy
tags:
- runner
script:
- echo “Deploying application…”
- echo “Application successfully deployed.”

with the above script i am not able to get the artifacts as per my analysis . how to get proper artifacts and that should reflect in my project repo

Any help is kindly appreciated, thanks in advance