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"}