gitlab-plugin icon indicating copy to clipboard operation
gitlab-plugin copied to clipboard

Jenkins build as 'failure' still pipeline status as 'passed' in GITLAB

Open nileshpokale opened this issue 3 years ago • 2 comments

Jenkins pipeline build status as 'failed' image

image

still GITLAB pipeline showing build status as 'passed'

image

I have using Jenkins scripted pipeline. gitlabCommitStatus(name: "MIL Testing"){ }

I want to see gitlab pipeline status as 'failed' if Jenkins pipeline build get 'failed'

nileshpokale avatar Mar 23 '21 18:03 nileshpokale

I think it doesn't have to be a bug. The gitlabCommitStatus method, as described in README, sends to GitLab the status of code executed within the block of this method (code enclosed in curly braces).

gitlabCommitStatus {
   // The result of steps within this block is what will be sent to GitLab
   sh 'mvn install'
}

So in this case the code within gitlabCommitStatus block could run successfully, which caused sending a success status to GitLab, and only some code placed further caused a build failure. If this is the case then the method works as intended in my opinion. Otherwise, please provide more detailed information about your pipeline code and Jenkins instance (version of core and gitlab plugin) so that the situation can be clarified.

ljackiewicz avatar Apr 05 '21 00:04 ljackiewicz

@nileshpokale It's solved ?

ghost avatar Jun 09 '21 06:06 ghost