Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateGitlabCommitStatus in post step is ignored #1659

Open
Ketec opened this issue May 27, 2024 · 0 comments
Open

updateGitlabCommitStatus in post step is ignored #1659

Ketec opened this issue May 27, 2024 · 0 comments
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@Ketec
Copy link

Ketec commented May 27, 2024

Jenkins and plugins versions report

We have unstable stages that are purely informative. So i need to set the result as success when pipeline is "unstable".

        post {
            unstable {
                echo 'updateGitlabCommitStatus'
                updateGitlabCommitStatus name: 'jenkins', state: 'success'
            }
        }

However, the gitlab plugin seems to completely ignore it and marks pipeline as failed regardless at the end.

[Pipeline] echo
14:14:41  updateGitlabCommitStatus
[Pipeline] updateGitlabCommitStatus
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }

[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] End of Pipeline
[GitLab Pipeline Status] Notifying branch build status: FAILED<branch>#14: This commit is unstable with partial failure.
[GitLab Pipeline Status] Notified
Finished: UNSTABLE

It seems to execute it's own notify always at the very end regardless of what you did manually.

Jenkins also does not allow setting pipeline to a "better" state manually.

What Operating System are you using (both controller, and any agents involved in the problem)?

linux

Reproduction steps

Add post step to override final pipeline status.

Expected Results

It overrides the status to what i specified.

Actual Results

It does not override and marks pipeline as failed.

Anything else?

No response

Are you interested in contributing a fix?

No response

@Ketec Ketec added the bug For changelog: Minor bug. Will be listed after features label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

1 participant