codebbkaf
Published in

codebbkaf

GitLab-CI & Fastlane

GitLab CI is very user-friendly, as an individual developer you don’t need to build a Jenkins server anymore, GitLab CI is all set for you. Let’s take a glance at the project I am going to introduce and how about the GitLab CI help us.

Today’s demo project is BowlingGame which contain Unit testing and UI testing, the CI part we use xcodebuild for testing, xcsummary for XCtest report generating and use fastlane for testflight uploading, so you need to install xcodebuild, and fastlane before start.

Part 1 setting fastlane and .yml:

  1. init fastlane: follow the instruction fastlane will guild you complete the information including app_identifier, apple_id, itc_team_id, team_id… etc, or you can check it in path /yourProject/fastlane/Appfile.

2. Set fastlane/Appfile: This file indicate the apple_id and team_id, etc..

3. Set fastlane/Appfile: This file is the main setting of fastlane.

4. Set .yml file: This file tells GitLab CI what to do, which steps should be done

5. Release Strategy:

Error Handle and Tips:

Part 2 set GitLab runner:

  1. move to GitLab open your project, see the left slider menu, select CI/CD

2. scroll to Runner section and disable Shared Runners for this project, we will use Specific Runner for CI/CD

3. open your terminal

Just make sure you have already install gitlab-runner, if not got install it. We need to register the git runner for our mac

Now all set, you may push some commit to test everything

--

--

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
HUA YU TSENG

I am Red, an iOS developer, I have hands on experience in iOS, Flutter, familiar with RxSwift Moya Unit/UI testing and Gitlab-CI.