Take care: Work In Progress here. This article might be incomplete or contain errors. Know something we don't? Help us! Contribute here on GitHub

Combine fortrabbit with Bitbucket

Learn how to integrate the second most popular Git-as-a-service provider with your fortrabbit workflow.

Bitbucket is a Git hosting service that offers advanced Git work-flows, such as 'pull requests'. It offers private repos in a free plan and is a popular choice in combination with fortrabbit. It also offers paid plans for "growing teams".

Bitbucket is similar to GitHub, please hop over to the GitHub integration article to learn about available work-flows, like having two remotes.

Deployment pipeline

Bitbucket has pipelines to handle hooks to build stuff. In order, for BitBucket to push to your fortrabbit App, you have to create an SSH key pair with Bitbucket and then add the public key to your fortrabbit App.

Example pipeline

The easiest way to do deployments via Bitbucket is just to do a git push to our deploy service in your pipeline. But that simple workflow does not work if you are also building some assets in your pipeline that ends up adding or changing files that you want to deploy. For pushing without building but at least with a production and a staging environment (check our multi staging article) you can use something like that:

pipelines:
  branches:
    master:
      -   step:
            name: Deploy to STAGING
            deployment: staging
            script:
              - git push --force {staging-app-name}@deploy.{region}.frbit.com:{staging-app-name}.git HEAD:master
      -   step:
            name: Deploy to PRODUCTION
            deployment: production
            trigger: manual
            script:
              - git push --force {production-app-name}@deploy.{region}.frbit.com:{production-app-name}.git HEAD:master

Further readings

Craft CMS

Install guides

Develop & deploy

Teamwork

Platform

Stacks

Need individual help?
Learn about Company plans ›
Looking for an old article?
See the full list of articles ›
Found an error?
Contribute on GitHub ›