Build stuck on pending with gitea / drone integration

I’ve recently tried to get back to using drone with my gitea installation but my build is stuck on pending. I just updated gitea and drone to their latest version (docker).

I did not use drone on this setup for a long time, and I am not sure my configuration is correct… Unfortunately, when looking up on Google there are a lots of various versions, and I guess the way it works now is different from most of Google’s answer.

I’d be grateful for any help on this.


Here is my docker-compose.yml:

version: '2'

services:
  server:
      image: gitea/gitea:latest
      restart: unless-stopped
      hostname: gitea.domain.fr
      environment:
        VIRTUAL_HOST: 'gitea.domain.fr'
        VIRTUAL_PORT: '3000'
      networks:
        - proxy
        - default
      expose:
        - '3000'
      ports:
        - '2222:22'
      volumes:
        - data:/data

  drone:
    image: drone/drone:latest
    restart: unless-stopped
    hostname: drone.domain.fr
    environment:
      VIRTUAL_HOST: 'drone.domain.fr'
      DRONE_GITEA_SERVER: 'https://gitea.domain.fr'
      DRONE_GITEA_CLIENT_ID: 'xxx'
      DRONE_GITEA_CLIENT_SECRET: 'xxx'
      DRONE_RPC_SECRET: 'xxx'
      DRONE_GIT_ALWAYS_AUTH: 'true'
      DRONE_RUNNER_CAPACITY: 2
      DRONE_SERVER_HOST: 'drone.domain.fr'
      DRONE_SERVER_PROTO: 'https'
      DRONE_TLS_AUTOCERT: 'false'
      DRONE_USER_CREATE: 'username:mikael.capelle,admin:true'
      DRONE_LOGS_DEBUG: 'true'
      DRONE_LOGS_TRACE: 'true'
    networks:
      - proxy
      - default
    expose:
      - '80'
    volumes:
      - drone:/data
      - /var/run/docker.sock:/var/run/docker.sock

volumes:
  data:
    driver: local

  drone:
    driver: local

networks:
  proxy:
    external:
      name: nginxproxy

My .drone.yml:

kind: pipeline
type: docker
name: default

steps:
  - name: python37-tests
    image: themattrix/tox
    commands:
      - tox

Here are the 3 last logs I get from drone:

drone_1   | {"level":"debug","msg":"api: root access granted","name":"simplex","namespace":"mikael.capelle","request-id":"1UT6Ea6NcrJn6quOt8RQpf8y1Bw","time":"2019-12-03T10:15:26Z","user.admin":true,"user.login":"mikael.capelle"}
drone_1   | {"fields.time":"2019-12-03T10:15:26Z","latency":809160,"level":"debug","method":"GET","msg":"","remote":"172.20.0.7:45738","request":"/api/repos/mikael.capelle/simplex","request-id":"1UT6Ea6NcrJn6quOt8RQpf8y1Bw","time":"2019-12-03T10:15:26Z"}
drone_1   | {"level":"debug","msg":"api: root access granted","name":"simplex","namespace":"mikael.capelle","request-id":"1UT6EZyEQ35TOPnmWNScrXUzRv3","time":"2019-12-03T10:15:26Z","user.admin":true,"user.login":"mikael.capelle"}
drone_1   | {"fields.time":"2019-12-03T10:15:26Z","latency":1381514,"level":"debug","method":"GET","msg":"","remote":"172.20.0.7:45740","request":"/api/repos/mikael.capelle/simplex/builds/7","request-id":"1UT6EZyEQ35TOPnmWNScrXUzRv3","time":"2019-12-03T10:15:26Z"}

It looks like you have not installed the Docker runner to process Docker pipelines. If no runners are installed, the pipelines will sit in a pending state.

@ashwilliams1 Thanks for the reply. I found earlier that this was the problem… Was this required previously? It’s hard to find a complete gitea + drone example that’s up-to-date currently.

The documentation includes the complete commands to install the server and runner. You can find the docker commands here:

There are 5 different types of runners (docker, kubernetes, exec, ssh, digitalocean) that you can install. We document runner installation separately from server installations since different teams will choose to install different runners.

@bradrydzewski What I meant was that there is no ready-to-use docker-compose.yml for these. I am not saying these should be included in the documentation since, as you said, there are lots of combinations.

The issue currently is that if you search for anything like “gitea + drone + docker” on Google, most results contains obsolete docker-compose.yml, thus making it hard to converge to a valid configuration.