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

create MR while running branch pipe creates mixed status with never ending branch status #1578

Open
andima opened this issue Sep 26, 2023 · 1 comment
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@andima
Copy link

andima commented Sep 26, 2023

Jenkins and plugins versions report

Environment
Jenkins: 2.401.3
Java: corretto-jdk-17.0.8_linux

Git plugin | git | 5.0.0
Jenkins Git client plugin | git-client | 4.0.0
Git Parameter Plug-In | git-parameter | 0.9.18
GitLab Plugin | gitlab-plugin | 1.6.0

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

nothing relevant i guess

Reproduction steps

  1. setup gitlab plugin with gitlabconnection and a few steps gitlabBuilds(builds: ['a', 'b', 'c']) in a multibranch pipeline and e.g. updateGitlabCommitStatus name: 'a', state: 'success' at the expected steps.

  2. run the branch pipe and everything is as expected with the external pipeline status in gitlab:
    a -> success
    jenkinsci/branch -> this commit looks good.
    b -> success
    c -> success

  3. trigger again a build and while building, create a MR. Caused by the MR , the branch pipe will be disabled but had already initialized the status steps. Now we have some mixed external pipeline status in gitlab with a status in from the branch and from the MR.
    a -> success
    jenkinsci/branch -> ... build started
    jenkinsci/mr-merge -> this commit looks good.
    b -> success
    c -> success

Expected Results

a -> success
jenkinsci/branch -> this commit looks good /success
jenkinsci/mr-merge -> this commit looks good/success
b -> success
c -> success

Actual Results

a -> success
jenkinsci/branch -> ... build started
jenkinsci/mr-merge -> this commit looks good.
b -> success
c -> success

Anything else?

these are our triggers;

triggers {
        gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
    }
@andima andima added the bug For changelog: Minor bug. Will be listed after features label Sep 26, 2023
@darshanapatel111
Copy link

Is this bug resolved? if this syntax is version specific, can anyone give me details reference url?
Not working the below syntax for me...

options {
gitLabConnection('Gitlab')
gitlabBuilds(builds: ['jenkinsci/mr-merge', 'jenkinsci/branch'])
}
post {
failure {
updateGitlabCommitStatus name: 'jenkinsci/mr-merge', state: 'failed'
updateGitlabCommitStatus name: 'jenkinsci/branch', state: 'failed'
}
success {
updateGitlabCommitStatus name: 'jenkinsci/mr-merge', state: 'success'
updateGitlabCommitStatus name: 'jenkinsci/branch', state: 'success'
}
aborted {
updateGitlabCommitStatus name: 'jenkinsci/mr-merge', state: 'canceled'
updateGitlabCommitStatus name: 'jenkinsci/branch', state: 'canceled'
}
}

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

2 participants