jenkinsci / gitlab-plugin

A Jenkins plugin for interfacing with GitLab
https://plugins.jenkins.io/gitlab-plugin/
GNU General Public License v2.0
1.44k stars 614 forks source link

Misleading message "No Gitlab connection configured" #764

Open wl2776 opened 6 years ago

wl2776 commented 6 years ago

Issue

Job console logs contain messages "No Gitlab connection configured", while build statuses are successfully reported.

Context

Problem description

I've got a matrix job, that is triggered by the Gitlab plugin through webhooks.

Job configuration contains configured "Gitlab connection" in General settings and 3 postbuild actions: "Add note with build status on Gitlab Merge requests", "Add vote for build status for Gitlab Merge requests" and "Publish build status to Gitlab commit".

It also contains a secret token in the advanced settings for Build triggers, and this token is entered in the settings of the Gitlab project.

Configured build trigger is the only "Build when a change is pushed to GitLab. GitLab CI Service URL: "

Console output contains 4 messages "No GitLab connection configured", one after git checkout and before build start, and 3 more in the end of the log.

The respective merge request in Gitlab contains messages like

"Administrator @root commented about an hour ago

:white_check_mark: Jenkins Build SUCCESS

Results available at: Jenkins matrix_job #66 "

that suggests, that build statuses are actually reported

omehegan commented 6 years ago

I have a feeling that this is due to the fact that you are using Matrix jobs. That job type works differently from most others, and sometimes there is some repetition of things that only happen once in other job types. I think you can safely ignore this.

@evgeni IIRC you wrote the code to add Matrix job support, any chance you could take a look at this?

jkugler commented 6 years ago

This affects me as well Gitlab plugin version: 1.5.10 Gitlab version: 9.5.6-ee Jenkins version: 2.145 Job type: Matrix Job/

I have a multi configuration project running and working. It has a gitlab reporter configured as a post-build step, and has a "GitLab Connection" configured. When a single configuration gets done running, it spits out a message in the console for that configuration saying "No GitLab connection configured." However, when the build job (for all configurations) is completed, it does report the build result back to GitLab.

omehegan commented 5 years ago

@evgeni any chance you could look at this?