tomasbjerre / pull-request-notifier-for-bitbucket

Bitbucket Server plugin that invokes a custom URL when a pull request event is triggered.
Other
185 stars 74 forks source link

pull request notifier not sending http requests to jenkins #261

Open githubposter12 opened 6 years ago

githubposter12 commented 6 years ago

Bitbucket: 4.9.1 Pull Request Notifier: latest Jenkins: 2.73.1

We don't have any firewall or networking issues because the official "Webhook to Jenkins for Bitbucket" plugin works just fine for triggering jenkins builds from commits.

We've tried configuring PR-notifier with and without an injection url or crumbs and it makes no difference. We've disabled CSRF protection in Jenkins and still nothing. We've also tried enabling all the event triggers and still nothing. We also tried GET vs POST.

Our admin has pulled these error log stack messages from Bitbucket. The screenshot of our options are below.

2017-11-16 14:27:38,290 ERROR [http-nio-7990-exec-86] USERID *16V6JWBx867x25143
35x1 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" se.bjurr.prnfb.service.PrnfbRenderer Error when resolving INJECTION_U
RL_VALUE
2017-11-16 14:27:38,296 ERROR [http-nio-7990-exec-86] USERID *16V6JWBx867x25143
35x1 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" c.a.p.r.c.e.j.ThrowableExceptionMapper Uncaught exception thrown by R
EST service: Header value must be set
2017-11-16 14:31:07,814 ERROR [http-nio-7990-exec-68] USERID *16V6JWBx870x25148
61x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" se.bjurr.prnfb.http.UrlInvoker
2017-11-16 14:31:07,819 ERROR [http-nio-7990-exec-68] USERID *16V6JWBx870x25148
61x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" se.bjurr.prnfb.service.PrnfbRenderer Error when resolving INJECTION_U
RL_VALUE
2017-11-16 14:31:07,950 ERROR [http-nio-7990-exec-68] USERID *16V6JWBx870x25148
61x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" se.bjurr.prnfb.http.UrlInvoker
2017-11-16 14:31:07,967 ERROR [http-nio-7990-exec-68] USERID *16V6JWBx870x25148
61x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" se.bjurr.prnfb.service.PrnfbRenderer Error when resolving INJECTION_U
RL_VALUE
2017-11-16 14:31:07,978 ERROR [http-nio-7990-exec-68] USERID *16V6JWBx870x25148
61x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/prnfb-admin/1.0/settings/bu
ttons/22d9ac9c-77b0-462b-b025-3a433ea6cc8e/press/repository/1679/pullrequest/478
HTTP/1.1" c.a.p.r.c.e.j.ThrowableExceptionMapper Uncaught exception thrown by R
EST service: Header value must be set
2017-11-16 14:31:22,500 ERROR [threadpool:thread-2] USERID *16V6JWBx871x2514887
x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/api/latest/projects/NFE/repos
/nfe_extract_demo/pull-requests/478/reopen HTTP/1.1" se.bjurr.prnfb.http.UrlInvo
ker
2017-11-16 14:31:22,500 ERROR [threadpool:thread-2] USERID *16V6JWBx871x2514887
x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/api/latest/projects/NFE/repos
/nfe_extract_demo/pull-requests/478/reopen HTTP/1.1" se.bjurr.prnfb.service.Prnf
bRenderer Error when resolving INJECTION_URL_VALUE
2017-11-16 14:31:22,599 ERROR [threadpool:thread-2] USERID *16V6JWBx871x2514887
x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/api/latest/projects/NFE/repos
/nfe_extract_demo/pull-requests/478/reopen HTTP/1.1" se.bjurr.prnfb.http.UrlInvo
ker
2017-11-16 14:31:22,600 ERROR [threadpool:thread-2] USERID *16V6JWBx871x2514887
x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/api/latest/projects/NFE/repos
/nfe_extract_demo/pull-requests/478/reopen HTTP/1.1" se.bjurr.prnfb.service.Prnf
bRenderer Error when resolving INJECTION_URL_VALUE
2017-11-16 14:31:22,600 ERROR [threadpool:thread-2] USERID *16V6JWBx871x2514887
x0 1bw7vf2 10.225.3.151,10.180.219.254 "POST /rest/api/latest/projects/NFE/repos
/nfe_extract_demo/pull-requests/478/reopen HTTP/1.1" s.b.p.l.PrnfbPullRequestEve
ntListener Unable to handle notification PrnfbNotification [filterRegexp=null, f
ilterString=${BUTTON_TRIGGER_TITLE}, headers=[PrnfbHeader [name=Jenkins-Crumb, v
alue=${INJECTION_URL_VALUE}]], injectionUrl=https://myhost.domain.com/crumbIssu
er/api/xml?xpath=//crumb, injectionUrlRegexp=<crumb>([^<]*)</crumb>, method=POST
, name=Jenkins Build Trigger, password=junk, postContent=${EVERYTHING_URL}, proj
ectKey=NFE, proxyPassword=null, proxyPort=null, proxyServer=null, proxyUser=null
, repositorySlug=nfe_extract_demo, triggerIfCanMerge=NOT_CONFLICTING, triggerIgn
oreStateList=[DECLINED], triggers=[MERGED, OPENED, BUTTON_TRIGGER, REOPENED, RES
COPED_FROM, RESCOPED_TO, UPDATED], updatePullRequestRefs=false, url=https://mys
erver.com/job/nfe_extract_demo_dev_regression/buildWithParameters?token=TOK
EN&cause=PULL_REQUEST&PULL_REQUEST_URL=${PULL_REQUEST_URL}&PULL_REQUEST_ID=${PUL
L_REQUEST_ID}&PULL_REQUEST_TO_BRANCH=${PULL_REQUEST_TO_BRANCH}&PULL_REQUEST_FROM
_HASH=${PULL_REQUEST_FROM_HASH}, user=junk, uuid=668e35e2-d1f3-4e3c-8ba9-771f8d2
05e0d, postContentEncoding=NONE]

image

Thanks for any help you can provide.

tomasbjerre commented 6 years ago

You need to remove the Jenkins-Crumb header and the ${INJECTION_URL_VALUE} unless you actually populate the value in the "Injection URL" section.

githubposter12 commented 6 years ago

should we be running 3.18 version of plugin with bitbucket 4.9.1? is it backwards compatible or should we be running 2.6.7?

tomasbjerre commented 6 years ago

All compatibility information is available here: https://marketplace.atlassian.com/plugins/se.bjurr.prnfs.pull-request-notifier-for-stash/versions