New commits on merge request doesn't link new related pipeline using drone ci

Hi !

When we push new commits on branches (that have a merge request opened), the pipeline corresponding to the last commit doesn’t show up in the merge request. The only “CI status” associated with the merge request is the pipeline for the first commit.

The pipeline configuration is correct, it indeed triggers a new one on push but it’s not updated in the merge request.

There you can see that the pipeline for the commit 7cacb2d7 is green and ran. Though, the last commit (forced push) was d651436d:

Here we can see that there’s only one pipeline associated to the merge request:

And the last screen where we can see that the last commit did trigger a new build:

Metadata:

GitLab 10.2.4
GitLab Shell 5.9.4
GitLab Workhorse v3.3.1
GitLab API v4

I’m using drone (0.8), followed configuration available here.

I think it’s gitlab’s responsability to link the merge requests and the pipelines, everything seems to work correctly on drone side.

Do you have any ideas to help me fix this?

Thanks!

Are you sure that you have set DRONE_HOST to the host including protocol of the drone instance? Like https://drone.example.com?

Most installations that fail to update the build status are lacking this variable or got a wrong value at this variable.

You mean in the drone configuration? Yes I have that variable.

Here goes my full drone configuration:

.env file

DRONE_SECRET=[redacted]
GIN_MODE=release
DRONE_HOST=http://gitlab:8003 (it's actually localhost:8003 as both are on the same machine named "gitlab")

docker-compose.yml:

version: '2'

services:
  drone-server:
    image: drone/drone:latest
    ports:
      - 8003:8000
      - 9000
    volumes:
      - /var/lib/drone:/var/lib/drone/
    restart: always
    env_file:
      - /root/docker-drone-gogs/.env
    environment:
      - DRONE_ORGS=bdr,ds,fry
      - DRONE_ADMIN=abluchet
      - DRONE_OPEN=true
      - DRONE_HOST=${DRONE_HOST}
      - DRONE_SECRET=${DRONE_SECRET}
      - DRONE_GITLAB=true
      - DRONE_GITLAB_URL=http://10.85.20.24
      - DRONE_GITLAB_SKIP_VERIFY=true
      - DRONE_GITLAB_PRIVATE_MODE=true
      - DRONE_GITLAB_CLIENT=[redacted]
      - DRONE_GITLAB_SECRET=[redacted]

  drone-agent:
    image: drone/agent:latest
    command: agent
    restart: always
    env_file:
      - /root/docker-drone-gogs/.env
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET=${DRONE_SECRET}

And this DRONE_HOST can also be resolved from Gitlab?

I assume so because my service is green in the admin area:

This points to http://gitlab:8003 and has every check box checked (no SSL verification though).

What would be the log / place to look if I want to find data about the requests being made to update the merge request status?

Hey :wave:. Were you able to resolve this? I followed https://docs.drone.io/intro/gitlab/single-machine/ and builds are being picked up just fine by drone, but, unfortunately, no status is displayed on gitlab side :-/ . Is there anything else I should do to make gitlab acknowledge drone?