Triggering build on Bamboo for pull requests on Stash?
Asked Answered
J

2

16

I want to know if it is possible to configure something similar to what is accomplished by Jenkins+Github with the request builder plugin. Specifically, triggering a build on Bamboo when a pull request is created on Stash, using the pull request branch for the build.

Bonus points for triggering new builds when the pull request is updated, or if some command is given through comments (like with the Jenkins plugin).

I can't see a way to do that, and I can't even see a way to create a plugin that will make it possible. Maybe the Merge-checks trigger for plugins would work, but it looks like something triggered when someone goes look at the pull request, not something triggered when a pull request arrives.

Jacques answered 10/7, 2013 at 21:18 Comment(0)
J
5

We solved this by writing a Stash plugin, which has now been open sourced and is available on github.

The trick is to annotate methods with com.atlassian.event.api.EventListener, which will get Stash to call them when a corresponding event happens. Then just listen to events such as:

  • com.atlassian.stash.event.pull.PullRequestCommentAddedEvent
  • com.atlassian.stash.event.pull.PullRequestOpenedEvent
  • com.atlassian.stash.event.pull.PullRequestReopenedEvent
  • com.atlassian.stash.event.pull.PullRequestRescopedEvent

Aside from that, just follow Atlassian guidelines to create plugins. The open sourced plugin can serve as a reference.

Jacques answered 20/3, 2015 at 0:53 Comment(0)
T
-2

Stash and Bamboo integration is standard in Atlassian.

Please see: https://confluence.atlassian.com/display/STASH/Bamboo+integration

Tourist answered 10/10, 2014 at 21:12 Comment(1)
I looked at it again just to see if this was recently introduced, but, no, it is still not supported. Please see the question you answered incorrectly.Jacques

© 2022 - 2024 — McMap. All rights reserved.