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

Bitbucket Notifications not working with Remote Jenkinsfile #120

Open
jgmsb opened this issue Aug 29, 2022 · 3 comments
Open

Bitbucket Notifications not working with Remote Jenkinsfile #120

jgmsb opened this issue Aug 29, 2022 · 3 comments

Comments

@jgmsb
Copy link

jgmsb commented Aug 29, 2022

Describe the bug
Hi. I've detected that when using the Remote Jenkinsfile plugin with a bitbucket repository, the default bitbucket notification that comes with multibranch pipelines stops working. Even using the Bitbucket Build Status Notifier to force the notification doesn't work either.

To Reproduce
Steps to reproduce the behavior:

  1. Having a vanilla multibranch pipeline with a bitbucket repo
  2. A bitbucket notification system working on this multibranch pipeline
  3. Getting the Remote Jenkinsfile Plugin and changing the Jenkins file system to the remote Jenkinsfile.
  4. Bitbucket notications stops working.

Expected behavior
The bitbucket notifications should work with the Remote Jenkinsfile Plugin

Jenkins Version

  • [Jenkins 2.346.3]

Remote Jenkinsfile Plugin Version

  • 1.23
@puzzup
Copy link

puzzup commented Nov 18, 2022

+1
The problem is caused by not propagating revision(but branch name is propagated) of the source branch revision.
Can be checked with this code in Jenkinsfile, based on the way bitbucket-branch-source-plugin determinate commit to notify:

import jenkins.scm.api.SCMSource
import jenkins.scm.api.SCMRevision
import jenkins.scm.api.SCMRevisionAction

SCMSource s = SCMSource.SourceByItem.findSource(currentBuild.rawBuild.getParent())
SCMRevision r = SCMRevisionAction.getRevision(s, currentBuild.rawBuild)
println("Repo: ${s.getRepository()} Revision: ${r}")

@dermyrddin
Copy link

Same is happening with GitLab Branch Source plugin - no job statuses returned.
Is there any workaround for this issue?

@rikardthomasson
Copy link

Any solutions to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants