Build your self hosted iOS CI with Gitlab

Gitlab is a wonderful tool to create your own pipeline. Combined to Fastlane, you will be able to have quickly your own CI scalable and maintainable.

Image for post
Image for post

Register Gitlab Runner

Image for post
Image for post
Image for post
Image for post
gitlab-runner register
Image for post
Image for post
Register a runner

Install Fastlane

brew install fastlane
fastlane init
Image for post
Image for post
fastlane init

Create Pipelines

Configure Lanes

Cocoapods Lane

Pod install lane
Image for post
Image for post
Test your podfile lane

Test Lane

Lint Lane

Image for post
Image for post
fastlane lint

Build lane

Generate Debug Lane

fastlane add_plugin firebase_app_distribution
curl -sL https://firebase.tools | bash
firebase login:ci
Image for post
Image for post
Generate your Firebase App Distribution Token
distribute:
stage: distribute
tags:
- mac-os
script:
- fastlane distribute
only:
refs:
- dev

Configure your Gitlab pipeline

Image for post
Image for post
Find your pipelines executions

History:

Android & iOS, quality in software is 𝛼&ɷ

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store