Big automation for little side-projects

3 min read Original article ↗

Because of the whole virus situation, I have some more free time than usual. So my friend and I decided to work on a fun little side project - a mobile game for kids!

When I hear about automation or CI/CD infrastructure all I can think of is big enterprise stuff. Automation is there to make things effective, not necessarily fun. For me, development is fun, but setting up all this infrastructure can be a pain.

It's especially frustrating when your build servers start to fail because something is broken that has nothing to do with your code. It just feels like a waste of time. After all, you're paid to make an app and not to configure a CI server.

Although I know that in one big company, there is a special team, whose whole purpose is to set and run a Jenkins server for other teams. That's all they do, the whole day!

Why automation?

Colleague sending text: "Can you send me the latest app?"

If messages like these happen to you from time to time, then you need automation. While in some deep work, any direct message can make you lose your focus and kill your productivity. Not only that but now you probably need to leave whatever you were doing and change branch to make the build for our dear John from Marketing.

You might think it's John's fault because he sent a direct message for something that's probably not that urgent. Ehmm, it's not. The problem is that you don't have basic automation set up. I've seen many companies that have an inferior CI/CD flow than our little side project, or none at all.

CI / CD

Since we are talking about mobile apps, most of the automation is about CI/CD. If you don't know what that is, here is a short explanation:

  • CI (Continuous Integration) - servers automatically perform some work after you push the code to make sure everything works right with your code
  • CD (Continuous Delivery) - if integration went fine, the app (web, mobile...) is automatically published somewhere so testers or end-users can use it.

Tools

And best of all, everything I'm going to show you is totally free and enterprise level. Actually, if you just go like one year back none of these tools existed, you had to use paid alternatives. The tools we use are:

Setup

So I've used several CI tools like Jenkins, Circle, and Bitrise. But GitHub Actions really surprised me. Since your code is already hosted at GitHub there is no setup at all. You don't need to hook anything up. You have a marketplace of ready-to-use actions which you just drop into your project. For example, we've used the one to build the app file that's ready for installation.

Firebase Tester app

Then we found another ready-to-use action that will send that app file to Firebase App Distribution to distribute the app to a few of our friends/testers.

Using Firebase App Distribution, our John from Marketing can open their Firebase Tester app and see all the latest versions and download them as he needs. You can see how that looks in the screenshot.

And that's it. It took us like 20 minutes. The automation isn't the only good thing we do, we write clean and somewhat documented code because that's what we used to do, even if it's a little side-project.

If this was an interesting read to you, leave a thumbs-up and maybe next time I'll tell you how we set up our project management or the "Poor Man's Jira" as we like to call it.