jenkinsci / jenkinsci/gitlab-plugin
updateGitLabCommitStatus Bug in parallel directive
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
Function updateGitLabCommitStatus returns wrong status when used in several stages within a parallel directive
### Context
- **Gitlab plugin version**: 1.5.9
- **Gitlab version**: 11.0.3 CE
- **Jenkins version**: 2.121.2
- **Job type**: Pipeline
### Logs & Traces

### Problem description
In my project I implemented a parallel stage('JenkinsPipeline'), whereby each stage within the parallel directive (('Unix Build') / ('Win Build') / ('Test Deployment')) verifies the build status using the updateGitLabCommitStatus. This function really works perfectly for sequential stages, however when one stage fails within the parallel stage, all stages within the parallel directive are shown as failed in the GitLab UI. However the sequential one ('Debian Package Deployment') after the parallel directive returns the right status.
```
stage('JenkinsPipeline') {
parallel {
stage('Unix build') {... updateGitLabCommitStatus ...}
stage('Win Build') {... updateGitLabCommitStatus ...}
stage('Test Deployment') {... updateGitLabCommitStatus ...}
}
}
stage('Debian Package Deployment') {... updateGitLabCommitStatus ...}
```
So for example: If stage('Unix Build') fails and the others succeed, stage('Win Build') and stage('Test Deployment') will still be shown as failed and stage('Debian Package Deployment') as succeeded in the GitLabUI. The JenkinsUI displays the right results in the Pipeline view though.
Contributor guide
Assessment
This issue has not been assessed yet.