Hey guys,
with the advent of Gitlab 8.10 (particularly this MR: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5004) it is now possible to mark builds as "success with warning".
That's quite interesting for us, especially in connection to this plugin. Is anybody of you guys interested in something like this:
gitlabCommitStatus("static_analysis", warn_on_failure = true) {
// do some Sonar for example
}
Which would mean: if the sonar step fails (for example through the use of build breaker (or for whatever reason)), mark the build as warn, since it's not directly affecting production (at least not in a way that a failing test or even build would be).
If there are people interested in it, I may give it a shot.
Cheers,
Jan
I think that would be great - it'd correspond very well to the unstable state in jenkins - I'd love to be able to map the "success with warning" to the unstable or failure result of various jenkins steps.
We probably will expose: allow_failure flag, that will allow you to mark this status as not fatal.
Will that work for you?
@ayufan as long as this flag provides us the possibility to mark a build as "success with warning" in GitLab via the API it will work for us.
Is there any work being done on this feature request? If not, I would suggest we close the issue.
Yes. We can add that to GitLaba API
On Thursday, October 27, 2016, Owen Mehegan [email protected]
wrote:
Is there any work being done on this feature request? If not, I would
suggest we close the issue.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jenkinsci/gitlab-plugin/issues/386#issuecomment-256773732,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACTpQcoBbuGs_7BI_q8tzguhFbor2Ruoks5q4RYMgaJpZM4JX9_2
.
@ayufan if you can comment when this work is done in GitLab, we will add it to our backlog to implement support.
@ayufan was this ever implemented?
Maybe it's in Gitlab 9.0.0 now that just got released...
@ayufan ping?
There's an open issue on GitLabfor adding extra options when posting the commit status - though it's been over 9 months since anything relevant happened there.
Note that the MR I had for the issue is probably a good starting point, but certainly needs rebased and I don't know how much has changed internally.
If needed I can help on GitLab side :)
I do not have the time to continue that branch at the moment, but I can probably review and test any MRs you submit.
While having that warn_on_failure parameter in gitlabCommitStatus is something we'll probably want in the long run, could it be considered to add success_with_warnings as a member of the com.dabsquared.gitlabjenkins.gitlab.api.model.BuildState enum to allow setting it manually through the use of updateGitlabCommitStatus ?
I believe it wouldn't account for nearly as much work as the warn_on_failure parameter while at least giving a way to flag builds as "unstable" on GitLab in the meantime.
I am wondering if the allow_failure option for a build was ever exposed ? I wish to do a pipeline of the form
gitlabBuilds(builds: ["build", "acceptable_if_i_fail": {
allow_failure: true
}]);
and then later if i did
updateGitlabCommitStatus name: "build", state: 'success'
updateGitlabCommitStatus name: "acceptable_if_i_fail", state: 'failure'
it would show up with gitlabs warning flag showing the developer the MR is unstable but not blocking like if a failure occured on build
Most helpful comment
While having that warn_on_failure parameter in gitlabCommitStatus is something we'll probably want in the long run, could it be considered to add success_with_warnings as a member of the com.dabsquared.gitlabjenkins.gitlab.api.model.BuildState enum to allow setting it manually through the use of updateGitlabCommitStatus ?
I believe it wouldn't account for nearly as much work as the warn_on_failure parameter while at least giving a way to flag builds as "unstable" on GitLab in the meantime.