Automatic push to production server

Hello,

I want know wheather its possible to automatically push code to production server? I have my code repo in bitbucket (git) and cloned it into my localhost and my production server. Whenever I do changes, I push it from the localhost and then pull it from the production server. Production server runs on EC2 ubuntu.

1 answer

This widget could not be displayed.
There are a couple ways of doing it. Easiest is to set up a cron job just to do a git pull every X minutes. Not really what you're asking for but it is the easiest. To do what you want - you'd need to set up a service to ping somewhere on a http accessible port. For more on bitbucket services see https://confluence.atlassian.com/display/BITBUCKET/Managing+Bitbucket+Services . Somewhere there is a list of ips that bitbucket pings from so you can filter on that. Then just have whatever is at the other end of that listening - do the git pull. Depending on your scale/usage etc - you might want to consider a CI server though.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

186 views 12 2
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you