trouble with Bitbucket Branch Source Plugin

192 views
Skip to first unread message

i.k...@betterfly-tourism.com

unread,
Nov 21, 2017, 3:50:31 PM11/21/17
to jenkins...@googlegroups.com
Hello,

I am having trouble setting up trigger of build after a push to Bitbucket. It happens on Jenkins version 2.73.3 (LTS)and 2.91 with Bitbucket Branch Source Plugin version 2.2.7.

A webhook is registered on Bitbucket when I create a Bitbucket Team/Project, that's good. However I am not seeing anything on the custom logger of com.cloudbees.jenkins.plugins.bitbucket.hooks for a push from Bitbucket.

To investigate further I setup the access logging as described at the bottom of https://support.cloudbees.com/hc/en-us/articles/115000051112

I get the following in the log following push "POST /bitbucket-scmsource-hook/ HTTP/1.1" 403 406...". I am not too sure what the log format is, but is seems like 403 indicates and error.

Is there anything I can do to assist in finding the problem?

Thanks in advance for any suggestions.

Ivan


itchymuzzle

unread,
Nov 21, 2017, 5:44:05 PM11/21/17
to Jenkins Users
Not an answer to your question, but to get to your issue you must have gotten past the one I am having.  Can you take a look at my question? [https://groups.google.com/forum/#!topic/jenkinsci-users/n3JaXcXFzVs]  Thanks.

Dan Tran

unread,
Nov 21, 2017, 7:26:30 PM11/21/17
to Jenkins Users
Hi

did it work before 2.73.3??

-D

i.k...@betterfly-tourism.com

unread,
Nov 23, 2017, 12:22:39 PM11/23/17
to jenkinsci-users
Hi,

I have tried 2.46.3, 2.60.3 and 2.73.2 without much luck. I tried a very simple setup with a project DUMMY (key DUM) with one repo git 'foo'. I ended up with the following Jenkinsfile:

pipeline {
agent any
triggers {
pollSCM ''
}
stages {
stage('Commit') {
steps {
checkout scm
...

The payload that the BB Webhook is sending to Jenkins seems OK:

{"actor":{"username":"ikanis","displayName":"Ivan Kanis"},"repository":{"scmId":"git","project":{"key":"DUM","name":"DUMMY"},"slug":"foo","links":{"self":[{"href":"https://bb/blablaDUM/repos/foo/browse"}]},"ownerName":"DUM","public":false,"owner":{"username":"DUM","displayName":"DUM"},"fullName":"DUM/foo"},"push":{"changes":[{"created":false,"closed":false,"new":{"type":"branch","name":"master","target":{"type":"commit","hash":"fa101eedb37a6bd876f47ea35e368fa91063c883"}},"old":{"type":"branch","name":"master","target":{"type":"commit","hash":"8b1804696297bc0167a57c27acce87572864f962"}}}]}}

I still don't get a build triggered on a git push.

The only thing that looks odd is an error in the configuration of the repo 'foo'. It says:

"HTTP ERROR 403
Problem accessing /job/d/job/foo/descriptorByName/com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource/fillRepositoryItems. Reason:
Forbidden" (I have attached a screeshot.)

I might have to debug Jenkins tomorrow. Could anyone give me pointers to which functions I need to look at?

Have a nice day,

Ivan



----- Mail original -----
De: "Dan Tran" <dan...@gmail.com>
À: "jenkinsci-users" <jenkins...@googlegroups.com>
Envoyé: Mercredi 22 Novembre 2017 01:26:30
Objet: Re: trouble with Bitbucket Branch Source Plugin

Hi

did it work before 2.73.3??

-D

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1669c2a8-00de-4e27-9b7b-7bd1093b6c76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Screenshot-2017-11-23 foo Config [Jenkins].png

Young Lee

unread,
Nov 23, 2017, 3:35:34 PM11/23/17
to Jenkins Users
Forgive me for asking, but did you verify you have access to the stash repo with the same credentials?

Dan Tran

unread,
Nov 24, 2017, 1:39:43 AM11/24/17
to Jenkins Users

i.k...@betterfly-tourism.com

unread,
Nov 24, 2017, 4:34:05 AM11/24/17
to jenkinsci-users
Hi Young Lee,

I have a credential user/password that has access to the Bitbucket repo. Did I understand your question correctly?

Ivan

----- Mail original -----
De: "Young Lee" <you...@gmail.com>
À: "jenkinsci-users" <jenkins...@googlegroups.com>
Envoyé: Jeudi 23 Novembre 2017 21:35:34
Objet: Re: trouble with Bitbucket Branch Source Plugin

> De: "Dan Tran" <dan...@gmail.com <javascript:>>
> À: "jenkinsci-users" <jenkins...@googlegroups.com <javascript:>>
> Envoyé: Mercredi 22 Novembre 2017 01:26:30
> Objet: Re: trouble with Bitbucket Branch Source Plugin
>
> Hi
>
> did it work before 2.73.3??
>
> -D
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-use...@googlegroups.com <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/1669c2a8-00de-4e27-9b7b-7bd1093b6c76%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d8793ce3-638f-4211-9b86-f9351bebf40c%40googlegroups.com.

i.k...@betterfly-tourism.com

unread,
Nov 24, 2017, 4:34:05 AM11/24/17
to jenkinsci-users
Hi,

We are using 1.5.4.

----- Mail original -----
De: "Dan Tran" <dan...@gmail.com>
À: "jenkinsci-users" <jenkins...@googlegroups.com>
Envoyé: Vendredi 24 Novembre 2017 07:39:42
Objet: Re: trouble with Bitbucket Branch Source Plugin

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2314bf2e-079f-4d12-9386-0f551ab63519%40googlegroups.com.

Joseph P

unread,
Nov 24, 2017, 4:34:09 AM11/24/17
to Jenkins Users
Yes please downgrade to 1.5.2 Bitbucket webhook plugin while we are looking into a fix

By uninstalling via Manage add-ons link and then choose upload add-on and put in the URL below
https://marketplace.atlassian.com/download/plugins/nl.topicus.bitbucket.bitbucket-webhooks/version/100500110

Docs from Atlassian:
https://confluence.atlassian.com/upm/uninstalling-add-ons-273875709.html#Uninstallingadd-ons-Uninstallinganadd-on
https://confluence.atlassian.com/upm/installing-add-ons-273875715.html#Installingadd-ons-Installingbyfileupload

Terribly sorry for not catching it before releasing :|

i.k...@betterfly-tourism.com

unread,
Nov 24, 2017, 5:33:38 AM11/24/17
to jenkinsci-users
Hi,

I have dowgraded to 1.5.2 and still not getting a build trigger. I am using 'Bitbucket Server Webhook to Jenkins' as a workaround.

Ivan

----- Mail original -----
De: "Joseph P" <jose...@gmail.com>
À: "jenkinsci-users" <jenkins...@googlegroups.com>
Envoyé: Vendredi 24 Novembre 2017 08:24:30
Objet: Re: trouble with Bitbucket Branch Source Plugin

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b04b7077-026a-4fb6-a710-0eb523239406%40googlegroups.com.

Young Lee

unread,
Nov 24, 2017, 11:04:31 AM11/24/17
to Jenkins Users
I previously had installed Post Webhooks for Bitbucket v1.6.0 and reported issues with `PullRequestEvents` not being submitted.

A downgrade to v1.5.2 resolved my issues.

My setup is Jenkins LTS 2.73.3,  bitbucket branch source plugin 2.2.7, and Post webhooks for Bitbucket v1.5.2.  This combo works for us.

BTW: here is the thread where I reported the issue

Joseph P

unread,
Nov 24, 2017, 12:11:06 PM11/24/17
to Jenkins Users
Have you enabled manage hook inside Jenkins system configuration in Bitbucket section? Or have you added the Jenkins webhook address inside the Repository settings under Post webhooks (this is basically what Manage hooks does)

Joseph P

unread,
Nov 28, 2017, 5:03:43 AM11/28/17
to Jenkins Users

i.k...@betterfly-tourism.com

unread,
Dec 4, 2017, 3:29:44 AM12/4/17
to jenkinsci-users
Hi,

You need to add a credential with Bitbucket user/password. It's documented here:

https://github.com/jenkinsci/credentials-plugin/blob/master/docs/user.adoc

Ivan

----- Mail original -----
De: "itchymuzzle" <chris...@3derm.com>
À: "jenkinsci-users" <jenkins...@googlegroups.com>
Envoyé: Mardi 21 Novembre 2017 23:44:05
Objet: Re: trouble with Bitbucket Branch Source Plugin
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f77cf19d-5351-499b-9fd1-38e624e64dac%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages