54
Introducing Continuous Integration for iOS

Continuous Integration for iOS

  • Upload
    codete

  • View
    155

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Continuous Integration for iOS

Introducing

Continuous Integration for iOS

Page 2: Continuous Integration for iOS

The benefits of Continuous Integration

Chosen platform

Additional tools

Workflow

Examples of use

Agenda

Page 3: Continuous Integration for iOS

The benefits of Continuous Integration

Chosen platform

Additional tools

Workflow

Examples of use

Agenda

Page 4: Continuous Integration for iOS

Build proceess automation

Page 5: Continuous Integration for iOS

Goals:

keep the build fast

make it easy to get the latest builds

(i.e. from Crashlytics)

avoid last-minute chaos at release dates

everyone can see the results of the latest builds

(s.c. big screen)

Build process automation

Page 6: Continuous Integration for iOS

Test automation

Page 7: Continuous Integration for iOS

Goals:

enforce discipline of frequent automated testing

automatically run the tests periodically or after

every push

report the results to the developers via email or Slack

Test automation

Page 8: Continuous Integration for iOS

Code quality inspection

Page 9: Continuous Integration for iOS

Goals:

introduction of coding rules

automated code analysis

automated search for potential bugs and code

duplications

Test automation

Page 10: Continuous Integration for iOS

The benefits of Continuous Integration

Chosen platform

Additional tools

Workflow

Examples of use

Agenda

Page 11: Continuous Integration for iOS

Xcode Server

Page 12: Continuous Integration for iOS

Software from Apple that allows to apply the following

practices of continuous integration on the iOS and OS X

platforms:

build process automation

test automation

code quality inspection

Xcode Server

Page 13: Continuous Integration for iOS

Considered platforms

Page 14: Continuous Integration for iOS

Pros:

easy integration with iOS projects

direct configuration from developer's Xcode

free for Apple Developer Program members

free of charge tests on real devices

customizable and expandable with additional tools,

i.e. SonarQube

Xcode Server

Page 15: Continuous Integration for iOS

Cons:

requires Mac

hermetic environment

lack of learning materials

Xcode Server

Page 16: Continuous Integration for iOS

The benefits of Continuous Integration

Chosen platform

Additional tools

Workflow

Examples of use

Agenda

Page 17: Continuous Integration for iOS

SonarQube

Page 18: Continuous Integration for iOS

Open source platform for continuous inspection

of code quality.

SonarQube

Page 19: Continuous Integration for iOS

Fastlane

Page 20: Continuous Integration for iOS

Open source tool that:

enables automatic management of Apple certificates

and provisioning profiles

allows to deliver app packages directly to

iTunesConnect

Fastlane

Page 21: Continuous Integration for iOS

Crashlytics

Page 22: Continuous Integration for iOS

Platform that enables beta distribution of mobile

applications.

Crashlytics

Page 23: Continuous Integration for iOS

Slack

Page 24: Continuous Integration for iOS

Messaging platform for collaboration in team.

Slack

Page 25: Continuous Integration for iOS

The benefits of Continuous Integration

Chosen platform

Additional tools

Workflow

Examples of use

Agenda

Page 26: Continuous Integration for iOS

Bots

Page 27: Continuous Integration for iOS

In Xcode you set up bots that run on the server

These bots process your apps, using the source code in

your remote repository, and report back the results

Bots can make builds, test your project or analyze your

project with the schemes you specify

Each run of a bot is called an integration, and these runs

occur regularly throughout the development life cycle

of your app

Bots

Page 28: Continuous Integration for iOS

Manage Bots

Page 29: Continuous Integration for iOS

On your development Mac, the Xcode report navigator

provides access to detailed information about your bots

and the integrations they've performed on the server.

Manage Bots

Report navigatorbutton

Page 30: Continuous Integration for iOS

Create, edit and delete bots from the report navigator.

Manage Bots

Page 31: Continuous Integration for iOS

Monitor Bots

Page 32: Continuous Integration for iOS

You can view summaries of a bot’s integrations directly

from Slack...

Monitor Bots

Page 33: Continuous Integration for iOS

You can view summaries of a bot’s integrations directly

from Slack...

Monitor Bots

Page 34: Continuous Integration for iOS

...possible errors from Apple Developer Center as images...

Monitor Bots

Page 35: Continuous Integration for iOS

...and summaries after uploading app to Crashlytics

or iTunesConnect.

Monitor Bots

Page 36: Continuous Integration for iOS

How to customize bot?

Page 37: Continuous Integration for iOS

Pre and Post integration scripts

How to customize bot?

Page 38: Continuous Integration for iOS

Pre integration scripts

Page 39: Continuous Integration for iOS

automatically increment build number using Apple

Generic versioning system

commit changes, create tag and push to remote

repository as an Xcode Server user

increment_build_number

Page 40: Continuous Integration for iOS

automatically manage all project dependencies

using Cocoapods

keep up-to-date with newest releases of third-party

libraries

automatically integrate third-party libs to your project

cocoapods

Page 41: Continuous Integration for iOS

manages certificates and provisioning profiles for

custom developer's account

beta_certificates - overlay for Codete default

Apple Enterprise Developer Account

release_certificates - overlay for Codete default

Apple AppStore Developer Account

certificates

Page 42: Continuous Integration for iOS

Post integration scripts

Page 43: Continuous Integration for iOS

performs static analysis of the procject's code

notifies developers about the result of analysis

sonarqube

Page 44: Continuous Integration for iOS

uploads the .ipa file to Crashlytics

crashlytics

Page 45: Continuous Integration for iOS

creates new iOS app on iTunesConnect

uploads the .ipa file to iTunesConnect

Appstore

Page 46: Continuous Integration for iOS

sends integration results directly to company's

Slack channel

you can easily modify recepients

Slack

Page 47: Continuous Integration for iOS

The benefits of Continuous Integration

Chosen platform

Additional tools

Workflow

Examples of use

Agenda

Page 48: Continuous Integration for iOS

Examples of use

Page 49: Continuous Integration for iOS

Examples of use

TESTS &ANALYSIS

BETA RELEASE

Page 50: Continuous Integration for iOS

Examples of use - test and analysis bot

Before integration:

bash cocoapods

Before integration:

sonarqube

slack

Page 51: Continuous Integration for iOS

Examples of use - beta bot

Before integration:

increment_build_number

cocoapods

beta_certificates

Before integration:

crashlytics

slack

Page 52: Continuous Integration for iOS

Examples of use - release bot

Before integration:

increment_build_number

cocoapods

release_certificates

Before integration:

appstore

slack

Page 53: Continuous Integration for iOS

Thank you for your attention