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, team ’25 europe, early bird extension, conference discount, barcelona, hybrid event, AI teamwork, early bird pass, digital access, collaboration conference, atlassian events, register now, developer conference

1 week left to save on your Team '25 Europe pass

Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.

Learn more
AUG Leaders

Atlassian Community Events