Drone integration does not work

Summary

The Drone CI integration does not work, the endpoint that gitlab is using "/api/hook" does not exist on Drone CI. This makes the integration broken and unusable.

Steps to reproduce

  • Create a gitlab application on your profile - https://gitlab.com/-/profile/applications
    • set the callback URL as the IP of the publicly available VPS, e.g. http://1.2.3.4/login
      • note that the IP itself is from any VPS as long as its publicly available
    • note the Application ID and Secret, it will be used later.
  • Create a basic standard drone CI server (docker-compose for ease of use):
version: '3.3'
services:
    drone:
        volumes:
            - '/var/lib/drone:/data'
        environment:
            - 'DRONE_USER_CREATE=username:$GITLAB_USERNAME,admin:true'
            - 'DRONE_GITLAB_SERVER=https://gitlab.com'
            - 'DRONE_GITLAB_CLIENT_ID=$APPLICATION_ID'
            - 'DRONE_GITLAB_CLIENT_SECRET=$APPLICATION_SECRET'
            - 'DRONE_RPC_SECRET=123456'
            - 'DRONE_SERVER_HOST=$IP_OF_VPS'
            - 'DRONE_SERVER_PROTO=http'
        ports:
            - '80:80'
            - '443:443'
        restart: always
        container_name: drone
        image: 'drone/drone:1'
    drone-runner-docker:
        volumes:
            - '/var/run/docker.sock:/var/run/docker.sock'
        environment:
            - DRONE_UI_USERNAME=root
            - DRONE_UI_PASSWORD=root
            - DRONE_RPC_PROTO=http
            - DRONE_RPC_HOST=$IP_OF_VPS
            - DRONE_RPC_SECRET=123456
            - DRONE_RUNNER_CAPACITY=2
            - 'DRONE_RUNNER_NAME=drone-worker'
        ports:
            - '3000:3000'
        restart: always
        container_name: runner
        image: 'drone/drone-runner-docker:1'
  • With that running on our VPS the Drone CI is running
  • Login to the drone CI via http://$IP_OF_VPS
    • Authenticate with your gitlab account
  • Enable Drone CI for your project, any project will do
  • On gitlab, on the project integration page enable Drone CI
  • enter the needed information on that page
  • click save and test
  • observe as the IP used results in a 404 when tested

The reason for this is the api endpoint used by the integration, i.e.:

http://$PUBLIC_IP_OF_DRONE_SERVER/api/hook?owner=$GITLAB_USERNAME&name=$GITLAB_PROJECT is the format of the hook that the integration is using and that API endpoint does not exist on Drone CI.

Example Project

Can be created on request if the above is not clear enough.

What is the current bug behavior?

Current outcome: 404s when gitlab sends requests to endpoint that does not exist:

What is the expected correct behavior?

Expected outcome: Drone CI integration for Gitlab successfully sends webhooks.

Relevant logs and/or screenshots

N/A

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

N/A

Results of GitLab application Check

N/A

Possible fixes

N/A