Trigger builds on pull request.

15 views
Skip to first unread message

Levani Kokhreidze

unread,
Jan 5, 2016, 2:45:22 AM1/5/16
to jenkin...@googlegroups.com
Hello Jenkins devs,

I want to implement https://issues.jenkins-ci.org/browse/JENKINS-29605 and I beleive it needs some changes that firstly I would like to clarify with you.

My initial idea was to add new dsl extension method like this:

freeStyleJob('test-job') {
  triggers{
    bitbucketPush()
  }
}
freeStyleJob('test-job') {
  triggers{
    bitbucketPullRequest()
  }
}

In addition I thought to introduce two new BitBucketPullRequestTrigger and BitBucketPushTrigger. Both of them will implement interface with methods like: 

getTriggerRule() - "repo:push" for BitBucketPushTrigger and "pullrequest:created, pullrequest:updated" for BitBucketPullRequestTrigger. Those rules will be used in BitbucketPayloadProcessor#processPayload method instead of current if statement for only "repo:push".

getDisplayName() - returns display name.

getShortDescription() - returns short description on how this build was triggered.

This is my initial idea, I thought it's a good to first share it with you. I'm open to any suggestions.

Thank you for your time.

Kind regards,
Levani Kokhreidze
Github: @lkokhreidze.
Reply all
Reply to author
Forward
0 new messages