In Part 1 we took care of all the prerequisites of preparing a clean Mac Mini as our Jenkins build server. Now we are ready to set up Jenkins and configure our jobs.
It’s good to summarize what we want to accomplish here. I’m not going into the merits of a CI server and why you should have one. Just trust me, you need one. If you want to read on the basics, see this Xamarin guide.
We want to automate the Build – Test – Deploy cycle for our Xamarin.iOS app, let’s call it MyProject from now on. It’s considered good practice to split up these tasks in separate jobs, both for maintainability and to limit job execution time. This way you can manage and track progress for each job separately. Separate jobs have its downsides too, but we will come to that. We are going to create 3 jobs:
- MyProject (Build)
- MyProject-testcloud (Test)
- MyProject-testflight (Deploy)
The MyProject job will trigger the jobs MyProject-testcloud and MyProject-testflight only when the build succeeds. This is what we call Downstream projects. Notice that we are deploying to TestFlight right after the build succeeds, we are not waiting for the Test Cloud tests to finish. This is because I want to deploy to TestFlight regardless of the Test Cloud results as TestFlight is used by our developers and manual testers.