connect.tech- level up your game with travisci

67
LEVEL UP YOUR GAME WITH TRAVISCI: FROM ZERO TO HERO IN 45 MINUTES By: Florian Harr @caeineflo iOS Engineer stablekernel.com

Upload: stablekernel

Post on 13-Apr-2017

77 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Connect.Tech- Level Up Your Game With TravisCI

LEVEL UP YOUR GAME WITH TRAVISCI: FROM ZERO TO HERO IN 45 MINUTESBy: Florian Harr @caffeineflo iOS Engineer stablekernel.com

Page 2: Connect.Tech- Level Up Your Game With TravisCI

Hi, I’m [Florian Harr].

Page 3: Connect.Tech- Level Up Your Game With TravisCI

Hi, I’m [Florian Harr].

• 10/2011 - 10/2014 Bachelors Degree in Computer Science, Stuttgart Germany

• 10/2014 - 01/2016 iOS Software Engineer @ Big Nerd Ranch, Atlanta, GA

• 01/2016 - Today iOS Software Engineer @ Stable|Kernel, Atlanta, GA

Page 4: Connect.Tech- Level Up Your Game With TravisCI

We’re stable|kernel. stable|kernel is an Atlanta-based mobile development company to craft smartly-designed mobile applications that connect brands directly with their users. Our team of engineers and designers takes clients from strategy through design, development and deployment, ensuring timely delivery of the highest quality applications.

Page 5: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Page 6: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extreme programming (XP) is a software development methodology which is

intended to improve software quality and responsiveness to changing customer requirements. As a type of agile software

development, it advocates frequent "releases" in short development cycles,

which is intended to improve productivity and introduce checkpoints at which new customer requirements can

be adopted.

Page 7: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

\kən-ˈtin-yü-əs\ \ˌin-tə-ˈgrā-shən\Continuous Integration

Page 8: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

\kən-ˈtin-yü-əs\ \ˌin-tə-ˈgrā-shən\Continuous Integration

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. • Each check-in is then verified by an automated build, allowing teams to

detect problems early.

adjective noun

Page 9: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

\kən-ˈtin-yü-əs\ \ˌin-tə-ˈgrā-shən\Continuous Integration

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. • Each check-in is then verified by an automated build, allowing teams to

detect problems early.

adjective noun

Page 10: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Continuous Integration (CI) is a

development practice

that requires developers to integrate code into a shared repository several times a day.

Each check-in is then verified by an

automated build allowing teams to detect problems early.

Page 11: Connect.Tech- Level Up Your Game With TravisCI

Commit Code

Let CI do it’s thing

??

Profit

Page 12: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Page 13: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Page 14: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

git commit

git push

service hook

issues build(s)

runs build(s)

notifi

es

CI LayerGit Layer

Page 15: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Page 16: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Free for public GitHub repositoriesPaid for GitHub hosted private repositories

Page 17: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Xcode Versions:• 6.1 • 6.2 • 6.3 • 6.4 • 7 • 7.1 • 7.2 • 7.3.1 • 8

Simulator:• iPhone 4s - 7 Plus • Apple Watch 38 + 42 mm • Apple TV 1080p

SDK:

• 7.0 • 7.1 • 8.1 • 8.2 • 8.3 • 8.4 • 9 • 9.1 • 9.2 • 9.3 • 10

• watchOS 2 • watchOS 2.1 • watchOS 2.2 • watchOS 3

• tvOS 9.0 • tvOS 9.1 • tvOS 9.2 • tvOS 10.0

Page 18: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Configured through .travis.yml file

Page 19: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Configured through .travis.yml file

.travis.yml

language: objective-cosx_image: xcode8xcode_project: FizzBuzz.xcodeprojxcode_scheme: FizzBuzz

Page 20: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Configured through .travis.yml filebefore_install:

install: before_script:

script: after_success: (after_failure:)

(before_deploy:) (deploy:)

(after_deploy:) (after_script:)

.travis.yml

language:

Page 21: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Configured through .travis.yml file

before_install:

install:

before_script:

script:

after_success:

(after_failure:)

(before_deploy:)

(deploy:)

(after_deploy:)

(after_script:)

You can do everything that you can do in your Terminal(.app)….

.travis.yml

language:

Page 22: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Configured through .travis.yml file

You can do everything that you can do in your Terminal(.app)…

…. which is pretty much everything*

*exclusions and smaller limitations reserved

.travis.yml

language: show live demo after this?!

Maybe live demo could show app and right afterwards integration results including snapshots

before_install:

install:

before_script:

script:

after_success:

(after_failure:)

(before_deploy:)

(deploy:)

(after_deploy:)

(after_script:)

Page 23: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

From Zero To Hero in 45 Minutes ….

Page 24: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Page 25: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Page 26: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Florians-MacBookPro:FizzBuzz evils$ fastlane init[23:20:03]: Detected iOS/Mac project in current directory...[23:20:03]: This setup will help you get up and running in no time.[23:20:03]: fastlane will check what tools you're already using and set up[23:20:03]: the tool automatically for you. Have fun! [23:20:03]: Created new folder './fastlane'.[23:20:03]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeprojYour Apple ID (e.g. [email protected]): [email protected][23:20:08]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...[23:20:08]: Starting login with user '[email protected]'Multiple teams found on the Developer Portal, please enter the number of the team you want to use: 1) Z6QSU67DFL "FeMoSo Systems GmbH" (Company/Organization)2) DR3HWS5LMB "Florian Harr" (Individual)3) CM487E42JY "Rheem Manufacturing Company" (Company/Organization)4) R9AR4U6NWF "Stable Kernel, LLC" (Company/Organization)2

+----------------+-------------------------------------------------------+| Detected Values |+----------------+-------------------------------------------------------+| Apple ID | [email protected] || App Name | FizzBuzz || App Identifier | com.iFlorian.FizzBuzz || Project | /Users/evils/Repositories/FizzBuzz/FizzBuzz.xcodeproj |+----------------+-------------------------------------------------------+

[23:20:12]: This app identifier doesn't exist on iTunes Connect yet, it will be created for you[23:20:12]: This app identifier doesn't exist on the Apple Developer Portal yet, it will be created for youPlease confirm the above values (y/n)y[23:20:22]: Created new file './fastlane/Appfile'. Edit it to manage your preferred app metadata information.[23:20:22]: Creating the app on iTunes Connect and the Apple Developer Portal[23:20:22]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeproj

23:21:24]: Successfully finished setting up fastlane

Page 27: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Florians-MacBookPro:FizzBuzz evils$ fastlane init[23:20:03]: Detected iOS/Mac project in current directory...[23:20:03]: This setup will help you get up and running in no time.[23:20:03]: fastlane will check what tools you're already using and set up[23:20:03]: the tool automatically for you. Have fun! [23:20:03]: Created new folder './fastlane'.[23:20:03]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeprojYour Apple ID (e.g. [email protected]): [email protected][23:20:08]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...

Page 28: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Florians-MacBookPro:FizzBuzz evils$ fastlane init[23:20:03]: Detected iOS/Mac project in current directory...[23:20:03]: This setup will help you get up and running in no time.[23:20:03]: fastlane will check what tools you're already using and set up[23:20:03]: the tool automatically for you. Have fun! [23:20:03]: Created new folder './fastlane'.[23:20:03]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeprojYour Apple ID (e.g. [email protected]): [email protected][23:20:08]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...

Page 29: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Florians-MacBookPro:FizzBuzz evils$ fastlane init[23:20:03]: Detected iOS/Mac project in current directory...[23:20:03]: This setup will help you get up and running in no time.[23:20:03]: fastlane will check what tools you're already using and set up[23:20:03]: the tool automatically for you. Have fun! [23:20:03]: Created new folder './fastlane'.[23:20:03]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeprojYour Apple ID (e.g. [email protected]): [email protected][23:20:08]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...

Page 30: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Florians-MacBookPro:FizzBuzz evils$ fastlane init[23:20:03]: Detected iOS/Mac project in current directory...[23:20:03]: This setup will help you get up and running in no time.[23:20:03]: fastlane will check what tools you're already using and set up[23:20:03]: the tool automatically for you. Have fun! [23:20:03]: Created new folder './fastlane'.[23:20:03]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeprojYour Apple ID (e.g. [email protected]): [email protected][23:20:08]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...

Page 31: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Florians-MacBookPro:FizzBuzz evils$ fastlane init[23:20:03]: Detected iOS/Mac project in current directory...[23:20:03]: This setup will help you get up and running in no time.[23:20:03]: fastlane will check what tools you're already using and set up[23:20:03]: the tool automatically for you. Have fun! [23:20:03]: Created new folder './fastlane'.[23:20:03]: $ xcodebuild clean -showBuildSettings -project ./FizzBuzz.xcodeprojYour Apple ID (e.g. [email protected]): [email protected][23:20:08]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...

Page 32: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Page 33: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Page 34: Connect.Tech- Level Up Your Game With TravisCI
Page 35: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Search the logs

Page 36: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Search the logs SSH into the VM

https://gist.github.com/jedi4ever/7677d62f1414c28a1a8c

Page 37: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Search the logs SSH into the VM

Page 38: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Search the logs SSH into the VM

Page 39: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Search the logs SSH into the VM

Page 40: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Sometimes builds fail ….

Search the logs

SSH into the VM

https://gist.github.com/jedi4ever/

Replicate your VM Environment

Page 41: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

Page 42: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coverage

coveralls.ioSnapshotsAppStore Submission

Beta Builds

Changelogs PivotalTracker

Watermarks

Matrix Builds

Page 43: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coverage

coveralls.ioSnapshotsAppStore Submission

Beta Builds

Changelogs PivotalTracker

Watermarks

Matrix Builds

Page 44: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coverage

coveralls.ioSnapshotsAppStore Submission

Beta Builds

Changelogs

PivotalTracker

Watermarks

Matrix Builds

Page 45: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

SnapshotsAppStore Submission

Beta Builds

Changelogs

PivotalTracker

Watermarks

Matrix Builds

Page 46: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

SnapshotsAppStore Submission

Beta Builds

Changelogs

PivotalTracker

Watermarks

Matrix Builds

Page 47: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

Snapshots

AppStore Submission

Beta Builds

Changelogs

PivotalTracker

Watermarks

Matrix Builds

Page 48: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

SnapshotsAppStore Submission Beta Builds

Changelogs

PivotalTracker

Watermarks

Matrix Builds

Page 49: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

SnapshotsAppStore Submission Beta Builds

Changelogs

PivotalTracker

Watermarks

Matrix Builds

Page 50: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

SnapshotsAppStore Submission Beta Builds

Changelogs

PivotalTracker

Matrix Builds

Watermarks

Page 51: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

FabricLint

UI Testing

Code Coveragecoveralls.io

SnapshotsAppStore Submission Beta Builds

Changelogs

PivotalTracker

Matrix Builds

Watermarks

Page 52: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Extensions of CI

Examples: • https://github.com/fastlane/examples • https://github.com/AFNetworking/AFNetworking • https://github.com/danielgindi/Charts

FabricLint

UI Testing

Code Coverage

coveralls.ioSnapshotsAppStore Submission

Beta Builds

Changelogs PivotalTracker

Watermarks

Matrix Builds

Page 53: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Other CI Solutions

Page 54: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

Page 55: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

• Similar to a managed full stack Travis CI Setup • Includes TestFlight like beta environment • Compatible with:

• BitBucket • GitHub • GitLab

Page 56: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

Page 57: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

• Continuous Integration + Deployment Platform • Configuration through circle.yml • Integrates with:

• GitHub • Bitbucket • GitHub Enterprise

Page 58: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

Page 59: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

Xcode Server: • Self Hosted • Has been problematic in the past • Integration with GitHub problematic

Page 60: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

Page 61: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Alternatives to TravisCI

• Self Hosted • Not always up to date • Relying on single open source project?!

Page 62: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Conclusion

Page 63: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Conclusion

Why do we do all of this?

Page 64: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

ConclusionWhy do we do all of this?

Page 65: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

ConclusionWhy do we do all of this?

• Avoid last minute emergencies early on • Ability to ship at any point • Regularly run tests • Save hours and hours of your time through automation

https://github.com/evils/FizzBuzz

Find Examples and more at ….

Page 66: Connect.Tech- Level Up Your Game With TravisCI

@stablekernel

Conclusion

And if that’s not reason enough ….

Page 67: Connect.Tech- Level Up Your Game With TravisCI

Questions?

Business Inquiries: Sarah Woodward Director of Business Development [email protected]

Florian Harr @caffeineflo [email protected] blog.stablekernel.com

@stablekernel