It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

bitbucket hooks not working using PR forking-workflow?

steve greensill Nov 28, 2017

Hi There,

So I am new to trying a PR workflow on bitbucket since I joined a new company and I was used to the github way of forking the main repo in order to submit PR's with jenkins jobs setup to run tests via the "pull request plugin for jenkins" - everything worked with minimal setup effort.

The goal:  I want to setup a forking-workflow with PR's coupled with jenkins jobs which detect when a PR is openend/changed and runs a job to run all our tests before anyone spends anytime looking at the PR.

The problem: I tried setting up a post receive hook that used a "PR OPENED" trigger which targeted a parameterized jenkins job, specifying $BRANCH and $REPOSITORY ...which would be used to:  git branch: "${params.branch}", url: "${params.repository}"

The hook always failed to fire.

I spent a day on this before trying PR's on the original repo ....and seeing the hook fire.  

So, do bitbucket hooks work using a PR forking-workflow?  If so can someone please share their setup with me.  I read quite a bit of the atlassian docs, but did not find any obvious warnings about forked repos+bitbucket hooks.

Any advice is much appreciated.

Thanks,

Steve

 

1 answer

0 votes
Scott Schreckengaust Oct 08, 2018

Use the BitBucket Branch Source Plugin and make sure PR's are in the "Discovery Branches" section

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

What podcasts are you listening to right now?

Like the title says: what podcasts are in your rotation right now? Here are some favorites I've been in to from the last few weeks. The Ringer NBA Show I've been diving deep into the NBA Playoffs...

800 views 16 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you