connect.tech- level up your game with travisci
TRANSCRIPT
LEVEL UP YOUR GAME WITH TRAVISCI: FROM ZERO TO HERO IN 45 MINUTESBy: Florian Harr @caffeineflo iOS Engineer stablekernel.com
Hi, I’m [Florian Harr].
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
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.
@stablekernel
@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.
@stablekernel
\kən-ˈtin-yü-əs\ \ˌin-tə-ˈgrā-shən\Continuous Integration
@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
@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
@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.
Commit Code
Let CI do it’s thing
??
Profit
@stablekernel
@stablekernel
@stablekernel
git commit
git push
service hook
issues build(s)
runs build(s)
notifi
es
CI LayerGit Layer
@stablekernel
@stablekernel
Free for public GitHub repositoriesPaid for GitHub hosted private repositories
@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
@stablekernel
Configured through .travis.yml file
@stablekernel
Configured through .travis.yml file
.travis.yml
language: objective-cosx_image: xcode8xcode_project: FizzBuzz.xcodeprojxcode_scheme: FizzBuzz
@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:
@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:
@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:)
@stablekernel
From Zero To Hero in 45 Minutes ….
@stablekernel
@stablekernel
@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
@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...
@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...
@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...
@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...
@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...
@stablekernel
Sometimes builds fail ….
@stablekernel
Sometimes builds fail ….
@stablekernel
Sometimes builds fail ….
Search the logs
@stablekernel
Sometimes builds fail ….
Search the logs SSH into the VM
https://gist.github.com/jedi4ever/7677d62f1414c28a1a8c
@stablekernel
Sometimes builds fail ….
Search the logs SSH into the VM
@stablekernel
Sometimes builds fail ….
Search the logs SSH into the VM
@stablekernel
Sometimes builds fail ….
Search the logs SSH into the VM
@stablekernel
Sometimes builds fail ….
Search the logs
SSH into the VM
https://gist.github.com/jedi4ever/
Replicate your VM Environment
@stablekernel
Extensions of CI
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coverage
coveralls.ioSnapshotsAppStore Submission
Beta Builds
Changelogs PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coverage
coveralls.ioSnapshotsAppStore Submission
Beta Builds
Changelogs PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coverage
coveralls.ioSnapshotsAppStore Submission
Beta Builds
Changelogs
PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
SnapshotsAppStore Submission
Beta Builds
Changelogs
PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
SnapshotsAppStore Submission
Beta Builds
Changelogs
PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
Snapshots
AppStore Submission
Beta Builds
Changelogs
PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
SnapshotsAppStore Submission Beta Builds
Changelogs
PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
SnapshotsAppStore Submission Beta Builds
Changelogs
PivotalTracker
Watermarks
Matrix Builds
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
SnapshotsAppStore Submission Beta Builds
Changelogs
PivotalTracker
Matrix Builds
Watermarks
@stablekernel
Extensions of CI
FabricLint
UI Testing
Code Coveragecoveralls.io
SnapshotsAppStore Submission Beta Builds
Changelogs
PivotalTracker
Matrix Builds
Watermarks
@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
@stablekernel
Other CI Solutions
@stablekernel
Alternatives to TravisCI
@stablekernel
Alternatives to TravisCI
• Similar to a managed full stack Travis CI Setup • Includes TestFlight like beta environment • Compatible with:
• BitBucket • GitHub • GitLab
@stablekernel
Alternatives to TravisCI
@stablekernel
Alternatives to TravisCI
• Continuous Integration + Deployment Platform • Configuration through circle.yml • Integrates with:
• GitHub • Bitbucket • GitHub Enterprise
@stablekernel
Alternatives to TravisCI
@stablekernel
Alternatives to TravisCI
Xcode Server: • Self Hosted • Has been problematic in the past • Integration with GitHub problematic
@stablekernel
Alternatives to TravisCI
@stablekernel
Alternatives to TravisCI
• Self Hosted • Not always up to date • Relying on single open source project?!
@stablekernel
Conclusion
@stablekernel
Conclusion
Why do we do all of this?
@stablekernel
ConclusionWhy do we do all of this?
@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 ….
@stablekernel
Conclusion
And if that’s not reason enough ….
Questions?
Business Inquiries: Sarah Woodward Director of Business Development [email protected]
Florian Harr @caffeineflo [email protected] blog.stablekernel.com
@stablekernel