Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic deployment on branch commit

James Hayes July 28, 2022 edited

Hi there, I'm just starting to get my head around BitBucket and I love it's potential. We have a repro that is worked on by several colleagues, and when each is happy with their branch they merge into a staging branch. When happy with that we then merge into Production branch. Pretty standard stuff. When using SASS the staging & producion commits go into CircleCI which then pushes to server.

For a small dev project that doesn't need to be compiled, like a basic WordPress site, I would like BitBucket to simple automatcially push the staging branch once someone has commited to it. I can see this is done as a pipline and I have the SSH keys setup and communicating with the SiteGround hosting, but cannot work out how to get the pipeline to do this. Any assistance appreciated.

Thanks

J

2 answers

0 votes
Matija Varjacic August 2, 2022 edited

Hey.
I believe you can create a git repo on the siteground. When you have that repo and you have SSH setup, you can clone bitbucket repository and then have a simple pipeline.

pipelines:
branches:
staging:
- step:
script:
- git remote add siteground ssh://user@siteground.biz:18765/home/user/repo.git ## or something similar
- git push master siteground

 

More
https://community.atlassian.com/t5/Bitbucket-questions/Is-Siteground-blocking-connection-to-bitbucket/qaq-p/779709 

James Hayes August 2, 2022 edited

Thanks @Matija Varjacic  I'm so close now, I can taste it !! Just got to work out a couple of errors in the above but I can have a bit of trial and error. I have it saved correctly now, I changed master to staging in your code, but it cannot find that. What have I done !?

James Hayes August 2, 2022

Ah it looks like bitbucket will only try to connect through port 22 even though I have the port in the URL. Need to speak with siteground about opening that port I think. Very strange.

0 votes
James Hayes July 28, 2022

I thought I had asked quite a simple question, am I way off the mark on what I am expecting BitBucket to do? Apologies for the noob approach!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events