In this post, I will share how to really take advantage of Jenkins to automate the most time-consuming part of any mobile app development process.
The usual/hard way to configure Jenkins is to create projects manually, maybe one for staging, one for production, etc. The easier way, which I will be showing here is by using a Pipeline.
All your Jenkins configuration will be in one simple file that lives alongside your source code means it will be easier to change and maintain and you won't have to go to Jenkins to change your settings every time you change your code.
I've been working with a startup on 2 React Native apps for the past 2 years and here's our development process:
The same flow happens when we merge the changes into the master branch except for this time Jenkins treats the build as a production build. So steps 1,2,3,4 will be the same but then:
5 - Jenkins runs Wix/Detox e2e testing
6 - Jenkins starts a production build.
7 - upload a new release to both App Store and Play Store
8 - add a release tag on Github to track version number
9 - Send tests report back to slack with download links
here's how it looks like in slack
As you can see the only action required from the developer side is just to push changes to GitHub and Jenkins will take care of the rest ✌️
Now let's see how to we tell Jenkins to do all of this. In one word JenkinsFile, and in code:
Here, we are just scratching the surface. Of course, to make this fully work you need to do a one-time Jenkins configuration to add your API keys, install some plugins like slack, and maybe add Groovy function to your Jenkinsfile to customize things.