Good time of the day, i am trying to implement CI/CD on my server.
As a main source of data i am using Gitea, and running Drone with the following configuration in Swarm.
version: '3.3'
networks:
net-proxy:
external: true
net-ci:
external: true
services:
drone:
image: drone/drone:1
environment:
DRONE_AGENTS_ENABLED: 'true'
#DRONE_GITEA: 'true'
DRONE_GITEA_SERVER: "https://git.company.org"
DRONE_GITEA_CLIENT_ID: "clientid"
DRONE_GITEA_CLIENT_SECRET: "clientsecret"
#DRONE_GITEA_SKIP_VERIFY: 'true'
#DRONE_GIT_ALWAYS_AUTH: 'true'
DRONE_RPC_SECRET: secretrpc
DRONE_SERVER_HOST: drone.company.org
DRONE_SERVER_PROTO: https
#DRONE_NETWORK: net-ci
volumes:
- /home/docker/drone:/data
networks:
- net-proxy
#- net-ci
logging:
driver: json-file
deploy:
labels:
traefik.http.services.drone.loadbalancer.server.port: '80'
traefik.enable: 'true'
traefik.http.routers.drone.rule: Host(`drone.company.org`)
traefik.http.routers.drone.entrypoints: http
traefik.http.routers.drone.middlewares: redirect@file
traefik.http.routers.drone-ssl.rule: Host(`drone.company.org`)
traefik.http.routers.drone-ssl.entrypoints: https
traefik.http.routers.drone-ssl.service: drone
traefik.http.routers.drone-ssl.tls.certresolver: default
traefik.http.routers.drone-ssl.tls: 'true'
restart_policy:
condition: on-failure
window: 120s
max_attempts: 3
runner-1:
image: drone/drone-runner-docker:1
environment:
DRONE_RPC_PROTO: https
DRONE_RPC_HOST: drone.company.org
DRONE_RPC_SECRET: secretrpc
DRONE_RUNNER_NAME: ${HOSTNAME}
#${HOSTNAME}
DRONE_RUNNER_CAPACITY: 2
#DRONE_RUNNER_NETWROKS: net-ci
#DRONE_DEBUG: 'true'
#DRONE_TRACE: 'true'
#DRONE_RPC_DUMP_HTTP: 'true'
#DRONE_RPC_DUMP_HTTP_BODY: 'true'
expose:
- 3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- net-proxy
#- net-ci
logging:
driver: json-file
deploy:
restart_policy:
condition: on-failure
window: 120s
max_attempts: 3
However, after some time (roughly 5 hours) Drone starts to fail to complete the clone
step. Its always resulting in the following error:
Initialized empty Git repository in /drone/src/.git/
--
+ git fetch origin +refs/heads/master:
fatal: unable to access 'https://git.company.org/company/application.git/': Failed to connect to git.company.org port 443: Operation timed out
I’ve tried to set the DNS providers in the /etc/docker/daemon.json
, tried to change networks, tried to assign networks per container. However no matter what, couple of hours later, Drone just fails to download the source code.
Am i missing something or it is a known issue which is waiting to be resolved?