Nothing happens when my gitea repo has been updated

Sorry if this is not the channel.

I’ve tested public cloud drone with my github account and all ok, but I need install on my on premise swarm cluster with gitea.

All seems ok, and drone is able to sync my gitea repos. But when created .drone.yml in one of them , nothing happens.

After adding my .drone.yml

kind: pipeline
type: docker
name: greeting

steps:
- name: en
  image: alpine
  commands:
  - echo hello
  - echo world

- name: es
  image: alpine
  commands:
  - echo hola
  - echo mundo
  - echo holaaaaaaaaaaaaaaaaaaaa

- name: fr
  image: alpine
  commands:
  - echo bonjour
  - echo monde

nothing happened, and I can not see it in the activity feed after commit.

Any error message in the drone server log

this is my drone stack setup

version: "3.3"
services:
  git:
    image: gitea/gitea:latest 
    environment:
      - USER_UID=1001
      - USER_GID=1001
      - DB_TYPE=postgres
      - DB_HOST=git-db:5432
      - DB_NAME=gitea
      - DB_USER=${WEB_ADMIN_USERNAME}
      - DB_PASSWD=${WEB_ADMIN_PASSWORD}
      - SSH_DOMAIN=git.${WEB_DOMAIN}
    networks:
      - net-public
    volumes:
      - gitea-data:/data
    ports:
      - "3000:3000"
      - "2222:22"
    deploy:
      placement:
        constraints:
          - node.labels.role.git == true
      labels:
        - traefik.enable=true
        - traefik.frontend.rule=Host:git.${WEB_DOMAIN}
        - traefik.docker.network=net-public
        - traefik.port=3000
        - traefik.tags=net-public
        - traefik.redirectorservice.frontend.entryPoints=http
        - traefik.redirectorservice.frontend.redirect.entryPoint=https
        - traefik.webservice.frontend.entryPoints=https
  git-db:
    image: postgres:alpine
    networks:
      - net-public
    volumes:
      - gitea-db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=${WEB_ADMIN_USERNAME}
      - POSTGRES_PASSWORD=${WEB_ADMIN_PASSWORD}
      - POSTGRES_DB=gitea
    deploy:
      placement:
        constraints:
          - node.labels.role.git == true
 
  drone-server:
    image: "${DRONE_SERVER_IMAGE:-drone/drone:latest}"

    networks:
      - net-public
    environment:
  
      DRONE_SERVER_HOST: drone.${WEB_DOMAIN}
      DRONE_SERVER_PROTO: "https"
      DRONE_LOGS_DEBUG: "true"
      DRONE_LOGS_PRETTY: "true"
      DRONE_RPC_SECRET: ${WEB_ADMIN_PASSWORD}"
      DRONE_DATABASE_DRIVER: sqlite3
      DRONE_DATABASE_DATASOURCE: /var/lib/drone/drone.sqlite
      DRONE_TLS_AUTOCERT: "false"
      DRONE_USER_CREATE: username:${WEB_ADMIN_USERNAME},admin:true
      # GITEA params
      DRONE_GITEA_SERVER: "https://git.${WEB_DOMAIN}"
      DRONE_GITEA_CLIENT_ID:  1fe82b29-6b8c-4f2c-ab23-c51dd8658a86
      DRONE_GITEA_CLIENT_SECRET: ZXobUf7hlxTm_Vy3MxcpmhO_KNgCIH9gDce57asGUp8=
      DRONE_GITEA_SKIP_VERIFY: "true"

    volumes:
      - drone-server-data:/var/lib/drone/
    deploy:
      placement:
        constraints:
          - node.role==worker
      replicas: 1
      labels:
        - traefik.enable=true
        - traefik.frontend.rule=Host:drone.${WEB_DOMAIN}
        - traefik.docker.network=net-public
        - traefik.port=80
        - traefik.tags=net-public
        - traefik.redirectorservice.frontend.entryPoints=http
        - traefik.redirectorservice.frontend.redirect.entryPoint=https
        - traefik.webservice.frontend.entryPoints=https

  drone-agent:
    image: "${DRONE_AGENT_IMAGE:-drone/agent:latest}"
    command: agent
    networks:
      - net-public
    environment:
      DRONE_SERVER: ws://drone-server/ws/broker
      DRONE_DEBUG: "true"
      DRONE_RPC_SECRET: ${WEB_ADMIN_PASSWORD}"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      placement:
        constraints:
          - node.role==worker
      replicas: 3

networks:
  net-public:
    external: true

volumes:
   gitea-data:
   gitea-db:
   drone-server-data:

Nothing relevant seem to be in the log file. How can I debug the problem?

have you taken a look at this thread? If yes, which specific issues mentioned in this thread have you already ruled out?
http://discuss.harness.io/t/nothing-happens-when-i-push-code-no-builds-or-builds-stuck-in-pending/3424/2

Hi @bradrydzewski, I’ve reviewed the thread , and I’ve recreated the environment . After that , The first I’ve seen is I don’t have any webhook on the main admin control panel

But I’ve seen per repo webhook

Drone is able to sync and configure gitea webhook, but any “/hook” request has been received.

Gitea log is not showing any error, I should config more verbose logging on my gitea instance, anyway I’ve seen these extrange log

{
  "arch": "amd64",
  "kernel": "",
  "kind": "pipeline",
  "level": "debug",
  "msg": "manager: request queue item",
  "os": "linux",
  "time": "2019-11-02T06:42:02Z",
  "type": "docker",
  "variant": ""
}
{
  "arch": "amd64",
  "kernel": "",
  "kind": "pipeline",
  "level": "debug",
  "msg": "manager: context canceled",
  "os": "linux",
  "time": "2019-11-02T06:42:32Z",
  "type": "docker",
  "variant": ""
}

What exactly means " request queue item and context canceled" ?

I will send gitea logs in a few minutes…

I’ve found that gitea didn’t request drone because of the self signed certificate

This was the gitea log output

2019/11/02 11:12:51 ...s/graceful/server.go:87:NewServer() [I] Starting new server: tcp:0.0.0.0:3000 on PID: 18
2019/11/02 11:13:38 ...s/webhook/deliver.go:179:DeliverHooks() [E] deliver: Post https://drone.myserver.io/hook?secret=5Bq2GZ8BWY9yHiG3KPpFud5Gqu56tj8m: x509: certificate is valid for 2a22c8a50bcf6fe0a18245ddbd8979b3.1c13c9704e69fcdb724d9de94cf8e6ae.traefik.default, not drone.myserver.io

After reconfigured the Gitea server with the SKIP_TLS_VERIFY = false in the webhook section , the build has been finally triggered

But in the clone step again the certificate it’s giving me a headache!

latest: Pulling from drone/git
Digest: sha256:292190fad13edcbc8a5cf0508ec10738378d98e91a390d980a5c31a615497f41
Status: Downloaded newer image for drone/git:latest
Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/master:
fatal: unable to access 'https://git.myserver.io/gitadmin_created_public_org/repo2.git/': SSL certificate problem: unable to get local issuer certificate

In my local lab can not install valid certificates for the sites, so I need skip all SSL related verify in git / http protocols

How can do that in drone?

You can configure the git client to skip SSL verification with an environment variable:

GIT_SSL_NO_VERIFY=true

The easiest way to pass this variable to your pipeline steps, including the clone step, is to configure this variables as a global environment variable:
https://docs.drone.io/runner/docker/configuration/reference/drone-runner-environ/

I’ve had been testing by adding GIT_SSL_NO_VERIFY first in the drone-server but didn’t work.

Adding to the runner everything is ok. OK

image

Thank you very much!!

I’ve had been testing by adding GIT_SSL_NO_VERIFY first in the drone-server but didn’t work. Adding to the runner everything is ok. OK

yes, the setting for global environment variables is a runner setting, as opposed to a server setting.

1 Like