[JIRA] (JENKINS-60322) updateGitlabCommitStatus doesn't work after cloning the second GitLab project

2 views
Skip to first unread message

gennady.krasnikov@softjoys.com (JIRA)

unread,
Nov 28, 2019, 1:07:02 PM11/28/19
to jenkinsc...@googlegroups.com
Gennady Krasnikov created an issue
 
Jenkins / Bug JENKINS-60322
updateGitlabCommitStatus doesn't work after cloning the second GitLab project
Issue Type: Bug Bug
Assignee: Marky Jackson
Components: gitlab-plugin
Created: 2019-11-28 18:06
Environment: Jenkins ver. 2.190.2
1.5.12 GitLab Plugin
GitLab Community Edition 11.6.5
Pipeline from SCM, groovy file
Priority: Critical Critical
Reporter: Gennady Krasnikov

If there is only one GitLab project which is cloned in the pipeline, updateGitlabCommitStatus works fine.

If two different projects were cloned before updateGitlabCommitStatus, it stops to work.
That is if you clone two projects at the very top of the pipeline, no one updateGitlabCommitStatus will work. If you clone the second project on some stage at the end of the pipeline, all updateGitlabCommitStatus above this will work fine, but all updateGitlabCommitStatus after cloning of the second project will fail.

There is issue https://github.com/jenkinsci/gitlab-plugin/issues/522 for the plugin about gitlabCommitStatus and it was resolved with documentation changing that it should be close to the corresponding SCM definition:
NOTE: If you use Pipeline global libraries, or if you clone your project's Jenkinsfile from a repo different from the one that contains the relevant source code, you need to be careful about when you send project status. In short, make sure you put your gitlabCommitStatus or other similar steps after the SCM step that clones your project's source. Otherwise, you may get HTTP 400 errors, or you may find build status being sent to the wrong repo
https://github.com/jenkinsci/gitlab-plugin
This doesn't work for updateGitlabCommitStatus. You can try to clone the first project just before updateGitlabCommitStatus, but this will not help.

There is also instruction that gitlabCommitStatus can be used for multiple GitLab connections and projects, https://github.com/jenkinsci/gitlab-plugin#notify-specific-project-by-a-specific-gitlab-connection
But updateGitlabCommitStatus doesn't contain such parameters and there is no other way to specify the GitLab project you want to update.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages