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

Connect Bitbucket-repository to my own live server

Rowdysign February 1, 2022

Hello, I am hosting all my websites and webapps in GIT at Bitbucket. Untill now if I have updates regarding my code I upload my code manually to my live server, not really handy ofcourse I know. So I am trying to install GIT with post-receive on my live server but it's not working all the time (I don't have a lot of knowledge regarding servers). 

I was wondering if there is some other way to connect my Bitbucket repositories to my live server? If so, how? Thanks in advance.

 

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2022

Hello @Rowdysign ,

Thank you for reaching our to community.

You could make use of Bitbucket Pipelines in order to deploy the code in your repository to another server.

To start using pipelines, you will have to create a YML file named bitbucket-pipelines.yml in the root of your repository repository. In this YML file you can configure a series of steps and the scripts to be executed in each step whenever the pipeline is triggered. For example, if you want to execute your deployment scripts every time a push is made to master branch, your YML file would look like the following : 

pipelines:
  branches: #these will run on every push of the branch
    master:
      - step:
          script:
            - <command 1>
- <command 2>

For more details on the different trigger options you can use in the YML file, and guidance on how to configure it, you can refer to the following documentation :

Specifically for deployment, we have several pipes that can be used as commands in the script section of your yml file, and help on automating the process. Allow me to share a few examples :

We also have pipes that facilitate the deployment to cloud services, such as AWS, Google Cloud, Azure and so on. For a full list of available pipes you can refer to below link :

Hope that helps. Let us know in case you have further questions :)

Thanks, @Rowdysign .

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events