Add branch information to Jenkins service (BB-6364)

Issue #5095 wontfix
Marcus Bertrand
staff created an issue

Jenkins supports building based on a specific branch. Add the ability to fire the Jenkins service only for a specific branch when that branch is committed/pushed to.

Comments (69)

  1. Ian Hunter

    I second this. I'd like to be able to trigger builds from production branches and development branches to separate servers, but only upon modification of these branches.

  2. Dryw Paulic

    +1 Having builds only trigger for specific branches would be a great feature to have. As of the moment, I have to go fishing around to find the last production commit build amid all our development feature builds...

  3. Ando Roots

    Setup: master and develop branch. I want automatic deployment when pushing to master, but not develop. I don't see a way to filter this from Jenkins side. Pretty please?

  4. jeroenvds

    We also want this feature, we have several builds running on jenkins, and our master branch should automatically publish our new version. But now when we push to development, a "new" version is published without any changes.

  5. Florian Herbel

    It would be great if one could set up multiple branch/Jenkins-projekt pairs in one service. This would allow more fine-grained continuous integration setups (e.g. for use with git-flow, ...). e.g.:

    Project-Name       Branch
    project-develop    develop
    project-master      master
    feature-branches * (a wildcard or empty or something like that)
  6. Kevin Baldwyn

    +1 I Definitely want this too! Would be amazingly useful, especially on larger projects where there are commits to various feature branches every hour. Really don't want to be doing production or even staging builds that frequently.

  7. Mahram Foadi

    For F$#& sake instead of '+1' click on the damn 'Vote' button. Why is this such a complicated concept to some people?
    When there is a 'Vote' button, commenting with '+1' means you're an idiot.

  8. Guillermo Sandoval

    Take it easy. As Ian says it is really not obvious where the 'vote' button is. Also, once I realized my mistake it was not possible to delete my comment; the delete link in the comment is just for show, it doesn't do anything.

    I'm the kind of idiot who needs a big flashy button hitting me in the face in order to see it, sorry pal.

  9. Ben Knoll

    They should do what Google Code issues does and add two links above the comment box that say: "Vote for this issue" "Watch this issue to receive email notifications."

    It is really annoying for those of us that are watching the issue to receive actual updates on progress to get "+1" email spam.

  10. Mahram Foadi

    Thanks, Ian. That's a more reasonable approach than the moron with "+1 ... sue me".

    Personally I found the vote button rather easily. Also if you scroll to the bottom to comment, you'd see the comment by Florian Herbel telling you to not comment with '+1' and vote instead.

    Now because of the moron-fest that has ensued, I'm removing my vote. I don't have the time to deal with the types of morons who willingly choose to spam all the thread subscribers just to troll me.

  11. kutenai

    wow.. this is a 'minor' issue?? This should be a major issue.
    I've been busy transferring my companies repos from github to bitbucket. We started using jira.. now, I find this is an issue? I would not even have considered this would be an issue. We have 30+ repos, and I have no interests in going and building alternatives for each... I was really looking at bitbucket as a much better alternative than github...


    Given that one of the primary roles of this page is to track voting then I think it's time you (Bitbucket) made the little side menu at top-right of these pages 'float' down with the scroll, and make the 'Vote for this issue' link a BIG button, ..I have a feeling that there would be no more '+1' entries in the comments list.

  13. Michal Kubik

    it would be great to be able to provide GET hook that could use some queryString replacements like branch:

    so for example such request could be configured and made by bb as post commit hook:

    That will allow better configuration of build by for example Jenkins buildWithParameters which base on request query string parameters.

    For now best shot is to use some proxy that will translate POST hook into whatever is needed.

  14. John Simpson

    Guys, the information you need (repo, branches, commit hashes, authors, timestamps, etc.) is all in the JSON block that BB sends to POST handlers (or "web hooks" I think they call them now.)

    Why not just write your own POST handler script, which receives that JSON block, parses it, and decides what other commands to run (i.e. "git pull" in a given directory, LWP request to fire off a Jenkins job, email/chat notification, forward the notification as-is to another server, whatever you need done) based on the contents of that JSON block?

    I did this, it's working great for us. BB sends one notification for every "git push" that our people do in any of our repos, and our {{bitbucket.cgi}} script handles everything for us.

  15. Roberto Gardenier

    I understand that writing your own solution could be a desirable solution, but in the mean time you'd figure that the bitbucket developers could have build this already as this issue was first created back in 2012, where it's now hitting it's 3 years open status.

  16. Kaleb Elwert

    Thanks for the update Jacob!

    I'm closing this as wontfix because we will eventually phase out support for the separate integrations in favor of options using webhooks because it gives services control over how they want to use the data, rather than relying on us to make those decisions.

  17. Log in to comment