This job is stuck, because the project doesn't have any runners online assigned to it. Go to Runners page

Navigator picture Navigator · Nov 19, 2018 · Viewed 38.3k times · Source

I am learning CI/CD.

I have installed Gitlab And Gitlab Runner From Officicals. But whenever running the pipeline during maven-build, the job gets stuck. I have registred runner and is available to my project but jobs get stuck

.gitlab-ci.yml

image: docker:latest
services:
- docker:dind

variables:
 DOCKER_DRIVER: overlay
 SPRING_PROFILES_ACTIVE: gitlab-ci

stages:
- build
- package
- deploy

maven-build:
 image: maven:3-jdk-8
 stage: build
 script: "mvn package -B"
 artifacts:
 paths:
  - target/*.jar

docker-build:
stage: package
script:
 - docker build -t registry.com/ci-cd-demo .
 - docker push registry.com/ci-cd-demo

k8s-deploy:
 image: google/cloud-sdk
 stage: deploy
 script:
  - echo "$GOOGLE_KEY" > key.json
  - gcloud container clusters get-credentials standard-cluster-demo -- 
  zone us-east1-c --project ascendant-study-222206
   - kubectl apply -f deployment.yml

My Runner Settings

My Share Runner

My project runner

Error message while runner already associated with project

Jo error message

Please help?

Answer

Jakub Záruba picture Jakub Záruba · Nov 19, 2018

The job is stuck because your runners have tags but your jobs don't. Follow these 4 steps to enable your runner to run without tags:

enter image description here enter image description here

Or set tags to your jobs. For more info: Configuration of your jobs with .gitlab-ci.yml - Tags