How We Use Bitbucket to Streamline Our Development Process

  • Dan Lister

Bitbucket is an online hosting provider for Git repositories. We use Bitbucket to host every piece of source code we have, whether it be public and private. Over the past year or so we've set up our repositories and Bitbucket account in a way that helps is manage our application and also streamlines our development process. With a combination of branches, tags, service hooks and email notifications, we've given our developers the best opportunity to create great solutions. This allows our team to focus solely on producing innovative applications. In this post, we talk in detail about the specifics of our repository setup.

Branches

Depending on our client's requirements, we generally use three branches within our repositories: master, staging and dev. The master branch always contains the last version deployed to a production environment. The staging branch contains new features which are ready to be viewed by our clients. The development branch is used for our developers to implement ongoing fixes and new features requested by our clients. For internal applications such as Golf Shot Calculator, we only use a master and development branch. Staging in this context is not needed as there isn't a preview environment for iOS applications. Bitbucket helps us view our branches and where each branch has progressed too.

Tags

Tags help us manage different versions of our websites and applications. For each release we complete to production, we create a tag within our Bitbucket repositories. Prior to starting a project, we usually define a roadmap of releases and describe the features to be included within each release. This more than often changes as each project progresses. Sometimes our client's requirements change. We use a Trello board for each project to make sure we can accommodate for any changes within a project's roadmap.

Comparing

Bitbucket's comparison tool is one of our favourite tools to use when managing our repositories. We can compare branches against branches, tags against tags and branches against tags. This gives us the ability to check any differences between branches and to help with identifying potential bugs. When reviewing changes between source and targets, Bitbucket give us the ability to merge both together or create pull requests. This means that releasing from development to staging or from staging to master can be completed straight from the browser.

Service Hooks

To make our development lives a little easier, we've set up a couple of service hooks into our Bitbucket repositories. The most important would be with Windows Azure. Every time a push is made to our master or staging branch, the application is automatically deployed to the correct website within Windows Azure. This automated release process allows Windows Azure to continually update each site and for us to push new features out quickly.

Teams

Managing who has access to our repositories is completed via Bitbucket Teams. They allow us to add users to our repositories with read or write access. It's a perfect way to allow our team members to collaborate with each other. It also means administration of repositories doesn't get in the way of our team members which means we can concentrate on creating great applications.

Email Notifications

We have email notifications setup for all our repositories too. We have full control over our notifications. We set up email notifications when our developers push any commits. This allows our teams and clients to view when developers have made changes to an application.