[JIRA] [bitbucket-pullrequest-builder-plugin] (JENKINS-31680) Use new bitbucket api to set if build success instead of add a comment

58 views
Skip to first unread message

rmatrono@gmail.com (JIRA)

unread,
Nov 20, 2015, 9:23:05 AM11/20/15
to jenkinsc...@googlegroups.com
Rubens M created an issue
 
Jenkins / Improvement JENKINS-31680
Use new bitbucket api to set if build success instead of add a comment
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: bitbucket-pullrequest-builder-plugin
Created: 20/Nov/15 2:22 PM
Priority: Minor Minor
Reporter: Rubens M

Would be nice if instead of posting many comments in the bitbucket pull-request, the plugin use the new build status API to set the build status, INPROGRESS, SUCCESSFUL, FAILED.

http://blog.bitbucket.org/2015/11/18/introducing-the-build-status-api-for-bitbucket-cloud/

https://confluence.atlassian.com/bitbucket/buildstatus-resource-779295267.html

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

pierrej@gmail.com (JIRA)

unread,
Dec 16, 2015, 9:13:05 AM12/16/15
to jenkinsc...@googlegroups.com
Pierre Jakobsen commented on Improvement JENKINS-31680
 
Re: Use new bitbucket api to set if build success instead of add a comment

Is this not (sort of) fixed by the latest release - version 1.4.8 ?

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 10:17:01 AM12/16/15
to jenkinsc...@googlegroups.com

Does not seem to work with 1.4.8. The build started, but neither a comment nor a build status was added to pull request that is being built.

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 10:19:01 AM12/16/15
to jenkinsc...@googlegroups.com

This is now even worse as with 1.4.7 because there is no notification at all that build of pull request has finished.

pierrej@gmail.com (JIRA)

unread,
Dec 16, 2015, 10:22:03 AM12/16/15
to jenkinsc...@googlegroups.com

Weird - for me (using 1.4.8) it works...but we see a bug when a user has added the 'test this please' comment (resulting in countless build jobs being scheduled and executed forever)

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 10:27:01 AM12/16/15
to jenkinsc...@googlegroups.com

We are using Jenkins 1.642. I believe this is the newest Jenkins. Is any special configuration required? We retained the same job configuration as it was with 1.4.7. We simply updated all Jenkins plugins...

Can I provide some logs that might be helpful? If yes, which one?

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 10:49:01 AM12/16/15
to jenkinsc...@googlegroups.com

We also noticed that with 1.4.8 each pull request triggers build multiple times. I will open a new issue for that.

pierrej@gmail.com (JIRA)

unread,
Dec 16, 2015, 11:00:01 AM12/16/15
to jenkinsc...@googlegroups.com

Afraid I cannot help with any logs - I just upgraded the plugin from within jenkins, restarted jenkins and added values for the two new variables. Then we got the new build status updated for the various PRs in bitbucket (as seen here http://blog.bitbucket.org/files/2015/11/PullRequestList-1024x631.png) as expected...and no comments in the PR itself which was great. Except we then started to notice the multiple jobs. I have already filed an issue (https://issues.jenkins-ci.org/browse/JENKINS-32097) , feel free to upvote it

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 11:08:05 AM12/16/15
to jenkinsc...@googlegroups.com

I've upvoted your issue. I haven't seen any new variables after updating to 1.4.8. I still have (as I had): 'Cron', 'Bitbucket BasicAuth Username', 'Bitbucket BasicAuth Password', 'RepositoryOwner', 'RepositoryName', 'CI Identifier', 'CI Name', 'CI Skip Phrases', 'Rebuild if destination branch changes?', 'Approve if build success?'. Am I not seeing something?

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 11:23:01 AM12/16/15
to jenkinsc...@googlegroups.com

OK, I've found new variables in global configuration pane.

rmatrono@gmail.com (JIRA)

unread,
Dec 16, 2015, 12:22:01 PM12/16/15
to jenkinsc...@googlegroups.com
Rubens M commented on Improvement JENKINS-31680

I create this request before the release of version 1.4.8, but yes, it is (sort of) implemented by the latest release,
Another problem in this released version is the option 'Rebuild if destination branch changes' doesnt work anymore.

dodoentertainment@gmail.com (JIRA)

unread,
Dec 16, 2015, 12:47:03 PM12/16/15
to jenkinsc...@googlegroups.com

It appears that global settings I found were for Bitbucket Approve plugin, not for Bitbucket pull request builder plugin. I still do not get Bitbucket statuses on build start. From log I can see that POST was sent, but in log I cannot see Bitbucket's response. If I try to reproduce the call with Postman, I get 403 "CSRF verification failed.". BitBucket API suggests using OAuth, and settings for plugin allow entering only BasicAuth username and password (if user has two-step authentication enabled, then plugin does not work at all). Is there a way to see what was returned from server? There are no exceptions in the log.

pierrej@gmail.com (JIRA)

unread,
Dec 17, 2015, 5:01:01 AM12/17/15
to jenkinsc...@googlegroups.com

Rubens M I figured so - and would thus have expected the developer to close the issue when 1.4.8 was released. I was not aware that the "Rebuild if.." feature broke - initially we used it but our master branch was/is very active (is a medium sized project but with many committers and concurrent active branches and small PRs) so we got too many PR-build jobs for our jenkins to handle. So it was disabled again...

pierrej@gmail.com (JIRA)

unread,
Dec 17, 2015, 5:12:01 AM12/17/15
to jenkinsc...@googlegroups.com

Nenad Miksa I just upgraded the plugin from within the "Manage jenkins" pages and then restarted. When setting up my PR-build job, I have added a specific (read-only) bitbucket account to our repository and then use this with basic auth (user+pw) to access the repo. I recall seeing another improvement issue for adding support for the jenkins credentials plugin or something, which would be nice - but for now this setup works. Wrt to the new plugin parameters, these are accessible from the "configure job" section in jenkins where you specify "build triggers" - in my case they just showed up.

pierrej@gmail.com (JIRA)

unread,
Dec 17, 2015, 5:13:05 AM12/17/15
to jenkinsc...@googlegroups.com

Just became aware of the issue list at https://github.com/nishio-dens/bitbucket-pullrequest-builder-plugin/issues - think that site is more actively monitored by developers, so moving my focus to there

ernst@ernstdehaan.com (JIRA)

unread,
Jul 12, 2019, 1:14:04 AM7/12/19
to jenkinsc...@googlegroups.com
Ernst de Haan resolved as Fixed
 
Change By: Ernst de Haan
Status: Open Resolved
Resolution: Fixed
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ernst@ernstdehaan.com (JIRA)

unread,
Jul 12, 2019, 1:14:04 AM7/12/19
to jenkinsc...@googlegroups.com
Ernst de Haan commented on Improvement JENKINS-31680
 
Re: Use new bitbucket api to set if build success instead of add a comment

The originally reported issue (see the Description) was resolved; the build status is indeed updated on the Bitbucket PR.

Therefore, marking as Resolved.

Reply all
Reply to author
Forward
0 new messages