Continuous Integration: buddybuild

      2 Comments on Continuous Integration: buddybuild

In this post I'll go over setting buddybuild up, and distributing your apps for testing/deployment.Last year I wrote about cloud based CI systems (nevercode and travis CI). Buddybuild is also one of the cloud based CI. In this post I’ll go over setting buddybuild up, and distributing your apps for testing/deployment.

Setup

After you sign up for you free account you can connect with GitHub (and a bunch of other repos) and pull down a list of your repositories. You can have multiple organisations on your buddybuild account, it’s a simple mater of adding a repo:

When you add a repo (or an app as buddybuild is calling it) it will be scanned and set up pretty much automagically for you:

As part of the setup procedure buddybuild will ask you to log in to iTunes Connect and it will even give you commands you can paste into your terminal so you can automatically upload your code signing identities. You have loads of configuration options that you can change later, but the simplicity of the automatic setup is just amazing. I actually found that I didn’t have to change anything, the wizard did its job.

After the last step, you’ll see a simple interface with the list of all your branches. Something like this:

You branches will start building every time you push something to the branch.

Tests

Just building a project isn’t all that useful (apart from a sanity check), the real power lays in running the tests and automatic deployment. Let’s cover the tests first. Each branch will have a little cogwheel on the right side, if you select it, you can configure this branch. For example, configuration for my master branch looks something like this:

If you select ‘Test settings’ and then ‘Configure’ you can select the simulators you want your tests to run on:

That’s pretty much it, your tests will run with each build. Pretty simple, right ๐Ÿ™‚

Deployment

Building and testing are the heart of a good CI system, but buddybuild offers you more. You can actually deploy your apps. You can deploy them to your testers using the internal buddybuild system, much like crashlytics where they’ll handle distributing your app to your beta testers. This is cool, but a really nice feature is deployment to iTunes Connect. Your build will be available on TestFlight and you can submit it for review right there and then.

Connect to iTunes Connect

In order to be able to deploy to iTunes Connect you’ll have to connect buddybuild to it. When you click on ‘deployments’ in the upper navigation bar you can see the deployments screen, select iTunes Connect and the big blue button to connect your account:

If you use two factor authentication, you’ll have to create an application specific key. When you do, you just enter it:

Now you’ll be able to select the frequency of deployments, the branch to deploy and the schemes to use:

I’m deploying from my master branch, so I want the deployments for each build and I want it built with the release scheme. One small detail to note here is, you will have to go to your master branch configuration and enable ‘build for archive’:

There’s even a helpful little subtitle ๐Ÿ™‚ Now every push into master should be deployed to iTunes Connect.

Another thing you might consider setting up is the automatic versioning of the app. If you go to the ‘App Settings’ in the upper navigation bar, you’ll see the automatic versioning in the menu on the left. You can set it to your liking, for example, mine looks like this:

Building

Once you open your pull request from develop into master buddybuild will automatically start building your pull request. You’ll see it in the dashboard:

This integrates with your GitHub repo quite nicely. You will see this as an additional check in your pull request:

You can even have your rules set to prevent the pull request from being merged unless all the checks have passed. I highly recommend this approach, especially for the master branch. And, of course, as soon as you merge your pull request your build will kick off again. Now you wait until your build magically appears on your iTunes Connect. You can upload the build manually if you want by selecting the latest build from the master and going to ‘iTunes Connect’ tab:

After a couple of minutes you should be able to see your build on iTunes Connect:

All your beta testers will be notified via TestFlight that a new build is available. And what’s great is, you can use this build when submitting your app for review.

This takes all the hassle of building and distributing an app to your testers. It will all magically work as soon as you merge that pull request into master, so you can spend your time focusing on code and the pull request and automate these mundane tasks.

Conclusion

We just scratched the surface here with buddybuild. You get a ton of features and configuration options. They even have their own SDK that you can use in your project for crash reports and user feedback. Integration with other services (like slack and GitHub) is also there.

I knew about buddybuild for a while, but I was still surprised how well it works. It took minutes to set up and once you set it all up, you don’t really have to do much around it. Handling of the provisioning went smoothly, as did deployment to iTunes Connect.

If you’re working in an agile environment, or if you just don’t want to wait for Xcode to finish uploading your app to iTunes Connect and want to go to sleep you should use buddybuild. It will save you tons of time. All in all, a great product.

I hope you enjoyed this article, and as usual, have a nice day ๐Ÿ™‚

Dejan.

Update

2018. Jan-10 – After this article has been written buddybuild has been acquired by Apple. As a result of this they will discontinue their free tier and they will no longer support android.

More resources

0

2 thoughts on “Continuous Integration: buddybuild

    1. Dejan Agostini Post author

      Didn’t see that one. I believe the original plan was to stop offering rhe free tier and to stop supporting Android. I really hope they will integrate it with iTunes Connect like they did with TestFlight.

      Reply

Leave a Reply