gitlab-branch-source-plugin
gitlab-branch-source-plugin copied to clipboard
Multi Branch Job Executed in jenkins but Pipeline status is still running state in GitLab
Jenkins and plugins versions report
Environment
Paste the output here
What Operating System are you using (both controller, and any agents involved in the problem)?
GitLab deployed on VM (RHEL)
Reproduction steps
- Created GitLab server connection with detected the Projects in GitLab. (Added webhook config)
- Created a multi branch pipeline using this plugin and discovered the branches.
- Open a merge request in GitLab project and trigger the Multi Branch Pipeline.
- Multi Branch Pipeline detected the Open MR and Ran the Job and completed successfully.
- But in GitLab It is showing Pipeline is still in running state because of which can't merge the MR (unless pipeline status shows as success in Gitlab)
Expected Results
Pipeline in GitLab should display the status and allow the merge request to merge successfully.
Actual Results
Pipeline is always in Running State and not displaying the success or failure status.
Anything else?
No response
Are you interested in contributing a fix?
No response
See the screenshot, which is still running state even though pipeline is completed in Jenkins.
We are also encountering this issue from time to time. See my comment at https://issues.jenkins.io/browse/JENKINS-70010?focusedId=443439&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-443439 Could this be the reason for you as well?
In the console log, the [GitLab Pipeline Status] Notified message will be missing. Normally, a build should end like this:
[GitLab Pipeline Status] Notifying branch build status: SUCCESS build/name #17: This commit looks good.
[GitLab Pipeline Status] Notified
Finished: SUCCESS
https://github.com/jenkinsci/gitlab-branch-source-plugin/issues/395
In the console log, the
[GitLab Pipeline Status] Notifiedmessage will be missing. Normally, a build should end like this:[GitLab Pipeline Status] Notifying branch build status: SUCCESS build/name #17: This commit looks good. [GitLab Pipeline Status] Notified Finished: SUCCESS
Check this one more issue I opened yesterday, when I opened custom script, it was not returning the status. https://github.com/jenkinsci/gitlab-branch-source-plugin/issues/395
we experience the exact same thing here.
we also see this in the logs:
Hi @banholzer ,
I'm not sure if this is the same error. We had error with jersey library too before. It was because 2 Jenkins plugins using this library but with different version. We delete artifactory plugin et it works after.
Not sure if it applies to the situation of the Issue creator, but we encountered this never-ending "Running" issue when multiple Jenkins instances were set up with Organization Folders for the same GitLab namespaces. i.e. in the "Webhooks" section of my GitLab projects, there were two separate webhooks for two different Jenkins URLs. I didn't bother investigating exactly why that situation was problematic because I didn't want or need two Jenkins instances building my projects -- it was inadvertently added. Removing the second webhook and/or removing duplicate Org Folder solved the issue.
We also noticed the stuck "Running" state under some unknown circumstances when a git push was quickly followed by a Merge Request creation using that source branch, while the source branch build was still in-progress. It seemed to have some relation to the selected gitLabBranchDiscovery strategy (https://github.com/jenkinsci/gitlab-branch-source-plugin/tree/master?tab=readme-ov-file#default-traits). Unfortunately, I can't explain that in any more detail because I never looked into it in depth.