Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,409,991
Community Members
 
Community Events
169
Community Groups

Jenkins poll scm with bitbucket builds everytime and not on changes

Hello,

I have jenkins job setup for bitbucket and i have setup SCM poll option in jenkins

I excpected that jenkins will poll Bitbucket and if it detects any change than only it will build but seems like its building everytime it polls no matter change is there or not ?

Am i missing something ?

I see a webhook trigger for bitbucket which notifies jenkins when checkin happens but i dont have public IP for jenkins server as it is  on internal network

so would like jenkins to poll bitbucket and build only if there is a change

 

-Thanks

 

 

 

1 answer

Hey Mehul,

Are you using Bitbucket Cloud or Bitbucket Server? 

You mentioned that you don't have a public IP for Jenkins. If you're using Bitbucket Cloud, then this means that your Jenkins server can't be reached over the internet and there's no way for an external service like Bitbucket to notify Jenkins of changes. In this scenario, you would either need to resort to polling, or make Jenkins publicly available. If necessary, you could limit the range of IP addresses able to connect to Jenkins, using the article What are the Bitbucket Cloud IP addresses I should use to configure my corporate firewall to know which IP addresses to allow.

If you're using Bitbucket Server, then presumably this should be on your local network so you can set up an add-on such as Jenkins for Bitbucket Server to handle triggering Jenkins.

One last thing, you mentioned that Jenkins seems to be building every time, regardless of whether new changes are detected. I've done a little research and according to JENKINS-20767, this can be an issue when using the bundled jgit executable rather than a native git binary. The above Jenkins JIRA issue also lists a few other possible causes around build configuration that could cause this to occur.

Cheers,

Dave

Hi Dave, 

I checked almost an exhaustive list of those IP addresses that are allowed but none of them seem to be working out for us.

Can you please check and let us know why is that the case and what we need to use a range of IP addresses we can check?

 

Thanks,

Sanjay

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events