iOS Continuous Integration and Delivery using Bitrise and Fastlane — Part 5

Abedalkareem Omreyh
3 min readJul 17, 2019

--

This is a part of a series about iOS continuous integration and delivery.

Part 1: Install Fastlane

Part 2: Match, increment version number, increment build number and add badge actions.

Part 3: gym, Pilot and Slack

Part 4: Bitrise!

In the fourth part, we set up Bitrise and ran our first build, in this part we will configure the triggers and workflows.

Workflow

A workflow is a collection of steps, environment variables, and other configurations for a single run. we will run each workflow when changes happen on the git, like push code to the master branch.

To add workflow:

1-Open the project then select Workflow.

2-Click on + Workflow button

3-Enter the name of the workflow

Now you have a new workflow, to change the lane that this workflow runs, scroll down and select fastlane then change fastlane lane.

To run the tests lane, follow the same steps, but this time name the workflow as tests and in Fastlane set the Fastlane lane to tests.

Triggers

To add a new trigger:

1- In the same page select Triggers.

2-Click on Add Trigger button

3-Now in the push branch enter the name of the branch that you want the build to start when you push the code to.

4-Press on the save button.

If you want to add a trigger to run the tests workflow, click again on add trigger, set the name of the push branch as develop, and in the workflow select tests workflow.

Now from the terminal make some changes and push the code to git, and check the Bitrise builds page!!.

The end

Congratulations!!, now the beta lane will execute each time you push the code to the master branch and it will upload a new build to iTunes connect. And if you pushed the code to the develop branch the tests will run and in case of success, it will send a message to slack!.

There is still a lot of things to learn and tools to try!, if you need to know more about Bitrise and Fastlane, you can visit Fastlane documentation and Bitrise documentation.

If you faced any problem you can add a comment below or send me a message on Twitter or facebook.

--

--