SlideShare a Scribd company logo
How we integrate & deploy
Mobile Apps with Travis CI
Marcio Klepacz, iOS Engineering @ GetYourGuide
Mobile Warsaw, Poland 2015
Overview
Who we are
Problem
Requirements
Solution
Result
Improving
Marcio Klepacz, GetYourGuide
Who we are
GetYourGuide Offers the Largest Travel
Activities Inventory Worldwide
Marcio Klepacz, GetYourGuide
800+
10,600+5,300+
800+
4,000+
2,000+
Marcio Klepacz, GetYourGuide
The Problem
Repetitive
Manual
We want to automate that
Fit our workflow
Developer Happiness
Marcio Klepacz, GetYourGuide
😄
Develop
😊
Run
Tests
😐
Configure
😒
Build
😠
Write
release
notes
😤
Upload,
notify
users,
etc.
The Requirements
Requirements
Marcio Klepacz, GetYourGuide
Automatically build and test on push
Fit into gitflow workflow (feature, develop and
release) branch
Produce binaries that can be tested (downloaded)
Requirements / Gitflow
Marcio Klepacz, GetYourGuide
Requirements / Gitflow
Marcio Klepacz, GetYourGuide
Requirements / Gitflow
Marcio Klepacz, GetYourGuide
Requirements / Summary
Marcio Klepacz, GetYourGuide
Build an Alpha App with Test Environment
Able to book with dummy credit card
Build a Beta App with the Live Environment
Real content
Build and test on every push
Distribute app to testers from release and develop branches
Relieve developers from repetitive manual tasks
Marcio Klepacz, GetYourGuide
Xcode
Server
Jenkins Ship.io Travis CI Circle CI
iOS and
Android
✘ ✔︎ ✔︎ ✔︎ ✔︎
Actions
specific to
branches
✔︎ ✔︎ ✔︎ ✔︎
✔︎
Build on
push
✔︎ ✔︎ ✔︎ ✔︎ ✔︎
Big
community
✔︎ ✔︎ ✘ ✔︎ ✘
Hosted ✘ ✘ ✔︎ ✔︎ ✔︎
The Solution
Travis
Marcio Klepacz, GetYourGuide
Hosted Continuous Integration service
Configuration file in your project (.travis.yml)
Define SDK, build env and output
custom scripts
Connected to Github
Triggers in every push and pull request
Available for many platforms
Travis Setup (.travis.yml)
Marcio Klepacz, GetYourGuide
It’s not using the iPhone SDK
code signing is needed
Doesn’t differentiate between branches
Doesn’t archive
Doesn’t distribute
language: objective-c
xcode_project: MyNewProject.xcodeproj
xcode_scheme: MyNewProjectSharedScheme
iPhone SDK
custom build per branch
generate .ipa
distribute
Import keys (import-keys.sh)
# 1. Create keychain
security create-keychain -p travis ios-build.keychain
# 2. Make as default
security default-keychain -s ios-build.keychain
# 3. Unlock keychain
security unlock-keychain -p travis ios-build.keychain
# 4. Add certificates to keychain
security import ./ios-travis-ci/certificates/dist.cer -k ios-build.keychain -T /usr/bin/codesign
security import ./ios-travis-ci/certificates/dist.p12 -k ios-build.keychain -P $KEY_DIST_PASSWORD -T /usr/bin/codesign
# 5. Copying provisioning profile to Travis
mkdir -p ~/Library/MobileDevice/Provisioning Profiles
cp ./ios-travis-ci/profiles/*.mobileprovision ~/Library/MobileDevice/Provisioning Profiles/
Marcio Klepacz, GetYourGuide
iPhone SDK
custom build per branch
generate .ipa
distribute
Import keys (import-keys.sh)
# 1. Create keychain
security create-keychain -p travis ios-build.keychain
# 2. Make as default
security default-keychain -s ios-build.keychain
# 3. Unlock keychain
security unlock-keychain -p travis ios-build.keychain
# 4. Add certificates to keychain
security import ./ios-travis-ci/certificates/dist.cer -k ios-build.keychain -T /usr/bin/codesign
security import ./ios-travis-ci/certificates/dist.p12 -k ios-build.keychain -P $KEY_DIST_PASSWORD -T /usr/bin/codesign
# 5. Copying provisioning profile to Travis
mkdir -p ~/Library/MobileDevice/Provisioning Profiles
cp ./ios-travis-ci/profiles/*.mobileprovision ~/Library/MobileDevice/Provisioning Profiles/
⛔️
️
Marcio Klepacz, GetYourGuide
iPhone SDK
custom build per branch
generate .ipa
distribute
Security
Marcio Klepacz, GetYourGuide
You can encrypt environment variables using
Travis command line tool on your terminal:
~ $ travis encrypt ‘KEY_DIST_PASSWORD=abc123’ –add
Passing the option “--add” will automatically add the secure
key to your .travis.yml
env:
global:
- secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf
iPhone SDK
custom build per branch
generate .ipa
distribute
Travis Setup (.travis.yml)
Marcio Klepacz, GetYourGuide
Use iPhone SDK ✅
Doesn’t differentiate between branches
Doesn’t archive
Doesn’t distribute
language: objective-c
env:
global:
- secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf
before_script:
- ./scripts/import-key.sh
script:
- xctool -workspace MyNewProject.xcworkspace -scheme MySharedScheme -sdk iphoneos -configuration Beta
iPhone SDK
custom build per branch
generate .ipa
distribute
Building (build_app.sh)
# 1.
xctool -workspace ${APP_NAME}.xcworkspace 
-scheme ${APP_NAME} 
-sdk iphonesimulator test
…
# 2.
export RELEASE_SUFFIX=".release”
# Bundle Identifier:
#
com.getyourguide.mobile.$(PRODUCT_NAME:rfc1034identifier)${BUNDLE_ID_SUFFIX}${RELEASE_
SUFFIX}
…
# 3
xctool -workspace ${APP_NAME}.xcworkspace -scheme ${APP_NAME} 
-sdk iphoneos 
-configuration ${APP_BUILD_CONFIG} 
OBJROOT=$PWD/build 
SYMROOT=$PWD/build
Marcio Klepacz, GetYourGuide
iPhone SDK
custom build per branch
generate .ipa
distribute
Travis Setup (.travis.yml)
Marcio Klepacz, GetYourGuide
Use iPhone SDK ✅
Differentiate between branches ✅
Doesn’t archive
Doesn’t distribute
…
global:
- secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf
matrix:
- APP_BUILD_CONFIG=Debug
- APP_BUILD_CONFIG=Beta
before_script:
- ./scripts/import-key.sh
script:
- ./scripts/build-app.sh
iPhone SDK
custom build per branch
generate .ipa
distribute
# 1.
xcrun -sdk iphoneos PackageApplication 
-v ”$BUILD_DIR/$APP_NAME.app" 
-o ”$BUILD_DIR/$APP_NAME.ipa" 
--sign "$DEVELOPER_NAME" 
--embed ”$PROVISIONING_PROFILE"
…
# 2.
release_notes=`git log --since=1.week --pretty=format:"%an - %s"`
curl 
-F status="2" 
-F notify="0" 
-F release_type="2" 
-F notes="$release_notes" 
-F notes_type="0" 
-F "ipa=@$outputdir/$APP_NAME.ipa" 
-F "mobileprovision=@$provisioning_profile" 
-H "X-HockeyAppToken: ${HOCKEY_APP_TOKEN}" 
https://rink.hockeyapp.net/api/2/apps/upload # Uploading to HockeyApp
Archiving and uploading
(archive_and_upload.sh)
Marcio Klepacz, GetYourGuide
iPhone SDK
custom build per branch
generate .ipa
distribute
Travis Setup (.travis.yml)
Marcio Klepacz, GetYourGuide
Use iPhone SDK ✅
Differentiate between branches ✅
Archive ✅
Distribute ✅
language: objective-c
env:
global:
- secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf
before_script:
- ./scripts/import-key.sh
script:
- ./scripts/build-app.sh
after_success:
- ./scripts/archive_and_upload.sh
iPhone SDK
custom build per branch
generate .ipa
distribute
Move the scripts away from the app
repository (Optional)
Marcio Klepacz, GetYourGuide
Maintenance 👍
Reusable 👍
Slower builds 👎
…
git:
submodules: false
before_install:
- git submodule init ios-travis-ci
- git submodule update --remote --merge ios-travis-ci
Result
Marcio Klepacz, GetYourGuide
Automate tasks
App is distributed
No manual configuration
Different actions between branches
5 different apps to test concurrently
(@banaslee’s phone)
Improving
Some pain left
Marcio Klepacz, GetYourGuide
Provisioning profile included on project 👎
Very long shell script files 👎
Can’t scale 👎
Very Travis dependent👎
Fastlane by @KrauseFx
Marcio Klepacz, GetYourGuide
Lets you define and run your deployment
pipelines for different environments.
Ruby gem
Powerful toolchain
Automates certificates and
prov.profile installs
Flexible
Open source
Fastlane / Example
Marcio Klepacz, GetYourGuide
# ../fastlane/Fastfile
#...
lane :deploy do
# Installing certificates
cert( development: true, username: "cibot@getyourguide.com")
# Fetching and installing proviosning profiles
sigh( adhoc: true, force: true, filename: "myFile.mobileprovision")
# Build project
gym( scheme: "MyApp", workspace: "MyApp.xcworkspace", configuration: ENV["APP_BUILD_CONFIG"])
# Shipping
hockey( api_token: '...', ipa: './app.ipa', notes: "Changelog")
end
#...
Fastlane / Example .travis.yml
Marcio Klepacz, GetYourGuide
language: objective-c
env:
global:
- secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf
script:
- bundle exec fastlane deploy
Scalable 👍
Faster 👍
Focused on Apple environment 👎
Thanks for your time
@marciok and marcio@getyourguide.com
References
Marcio Klepacz, GetYourGuide
Travis CI for iOS - Mattes Groeger
johanneswuerbach / .travis.yml - Johannes Würbach
The OS X Build Environment - Travis CI
Fastlane - Felix Krause

More Related Content

Similar to How we integrate & deploy Mobile Apps with Travis CI part 2

Building full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio CodeBuilding full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio Code
Microsoft Tech Community
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Pentesting Android Applications
Pentesting Android ApplicationsPentesting Android Applications
Pentesting Android Applications
Cláudio André
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Anna Klepacka
 
MOBILE PENTESTING Frida.pdf
MOBILE PENTESTING Frida.pdfMOBILE PENTESTING Frida.pdf
MOBILE PENTESTING Frida.pdf
Adityamd4
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
Jess Chadwick
 
How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...
How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...
How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...
Adriano Raiano
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
Synack
 
"I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
Fabio Milano
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails example
Railwaymen
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
Sarath C
 
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceTelerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
Jen Looper
 
Gatekeeper Exposed
Gatekeeper ExposedGatekeeper Exposed
Gatekeeper Exposed
Synack
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
Graham Charters
 
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Mia Chang
 
Mobile Day - Fastlane
Mobile Day - FastlaneMobile Day - Fastlane
Mobile Day - Fastlane
Software Guru
 
Configure & send push notification on i os device
Configure & send push notification on i os deviceConfigure & send push notification on i os device
Configure & send push notification on i os device
ShepHertz
 
One Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cOne Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12c
Josh Turner
 
2018 RubyHACK: put git to work - increase the quality of your rails project...
2018 RubyHACK:  put git to work -  increase the quality of your rails project...2018 RubyHACK:  put git to work -  increase the quality of your rails project...
2018 RubyHACK: put git to work - increase the quality of your rails project...
Rodrigo Urubatan
 
2018 the conf put git to work - increase the quality of your rails project...
2018 the conf   put git to work -  increase the quality of your rails project...2018 the conf   put git to work -  increase the quality of your rails project...
2018 the conf put git to work - increase the quality of your rails project...
Rodrigo Urubatan
 

Similar to How we integrate & deploy Mobile Apps with Travis CI part 2 (20)

Building full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio CodeBuilding full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio Code
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Pentesting Android Applications
Pentesting Android ApplicationsPentesting Android Applications
Pentesting Android Applications
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
MOBILE PENTESTING Frida.pdf
MOBILE PENTESTING Frida.pdfMOBILE PENTESTING Frida.pdf
MOBILE PENTESTING Frida.pdf
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
 
How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...
How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...
How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Eu...
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
 
"I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails example
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceTelerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
 
Gatekeeper Exposed
Gatekeeper ExposedGatekeeper Exposed
Gatekeeper Exposed
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
 
Mobile Day - Fastlane
Mobile Day - FastlaneMobile Day - Fastlane
Mobile Day - Fastlane
 
Configure & send push notification on i os device
Configure & send push notification on i os deviceConfigure & send push notification on i os device
Configure & send push notification on i os device
 
One Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cOne Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12c
 
2018 RubyHACK: put git to work - increase the quality of your rails project...
2018 RubyHACK:  put git to work -  increase the quality of your rails project...2018 RubyHACK:  put git to work -  increase the quality of your rails project...
2018 RubyHACK: put git to work - increase the quality of your rails project...
 
2018 the conf put git to work - increase the quality of your rails project...
2018 the conf   put git to work -  increase the quality of your rails project...2018 the conf   put git to work -  increase the quality of your rails project...
2018 the conf put git to work - increase the quality of your rails project...
 

Recently uploaded

GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

How we integrate & deploy Mobile Apps with Travis CI part 2

  • 1. How we integrate & deploy Mobile Apps with Travis CI Marcio Klepacz, iOS Engineering @ GetYourGuide Mobile Warsaw, Poland 2015
  • 4. GetYourGuide Offers the Largest Travel Activities Inventory Worldwide Marcio Klepacz, GetYourGuide 800+ 10,600+5,300+ 800+ 4,000+ 2,000+
  • 7. Repetitive Manual We want to automate that Fit our workflow Developer Happiness Marcio Klepacz, GetYourGuide 😄 Develop 😊 Run Tests 😐 Configure 😒 Build 😠 Write release notes 😤 Upload, notify users, etc.
  • 9. Requirements Marcio Klepacz, GetYourGuide Automatically build and test on push Fit into gitflow workflow (feature, develop and release) branch Produce binaries that can be tested (downloaded)
  • 10. Requirements / Gitflow Marcio Klepacz, GetYourGuide
  • 11. Requirements / Gitflow Marcio Klepacz, GetYourGuide
  • 12. Requirements / Gitflow Marcio Klepacz, GetYourGuide
  • 13. Requirements / Summary Marcio Klepacz, GetYourGuide Build an Alpha App with Test Environment Able to book with dummy credit card Build a Beta App with the Live Environment Real content Build and test on every push Distribute app to testers from release and develop branches Relieve developers from repetitive manual tasks
  • 14. Marcio Klepacz, GetYourGuide Xcode Server Jenkins Ship.io Travis CI Circle CI iOS and Android ✘ ✔︎ ✔︎ ✔︎ ✔︎ Actions specific to branches ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ Build on push ✔︎ ✔︎ ✔︎ ✔︎ ✔︎ Big community ✔︎ ✔︎ ✘ ✔︎ ✘ Hosted ✘ ✘ ✔︎ ✔︎ ✔︎
  • 16. Travis Marcio Klepacz, GetYourGuide Hosted Continuous Integration service Configuration file in your project (.travis.yml) Define SDK, build env and output custom scripts Connected to Github Triggers in every push and pull request Available for many platforms
  • 17. Travis Setup (.travis.yml) Marcio Klepacz, GetYourGuide It’s not using the iPhone SDK code signing is needed Doesn’t differentiate between branches Doesn’t archive Doesn’t distribute language: objective-c xcode_project: MyNewProject.xcodeproj xcode_scheme: MyNewProjectSharedScheme iPhone SDK custom build per branch generate .ipa distribute
  • 18. Import keys (import-keys.sh) # 1. Create keychain security create-keychain -p travis ios-build.keychain # 2. Make as default security default-keychain -s ios-build.keychain # 3. Unlock keychain security unlock-keychain -p travis ios-build.keychain # 4. Add certificates to keychain security import ./ios-travis-ci/certificates/dist.cer -k ios-build.keychain -T /usr/bin/codesign security import ./ios-travis-ci/certificates/dist.p12 -k ios-build.keychain -P $KEY_DIST_PASSWORD -T /usr/bin/codesign # 5. Copying provisioning profile to Travis mkdir -p ~/Library/MobileDevice/Provisioning Profiles cp ./ios-travis-ci/profiles/*.mobileprovision ~/Library/MobileDevice/Provisioning Profiles/ Marcio Klepacz, GetYourGuide iPhone SDK custom build per branch generate .ipa distribute
  • 19. Import keys (import-keys.sh) # 1. Create keychain security create-keychain -p travis ios-build.keychain # 2. Make as default security default-keychain -s ios-build.keychain # 3. Unlock keychain security unlock-keychain -p travis ios-build.keychain # 4. Add certificates to keychain security import ./ios-travis-ci/certificates/dist.cer -k ios-build.keychain -T /usr/bin/codesign security import ./ios-travis-ci/certificates/dist.p12 -k ios-build.keychain -P $KEY_DIST_PASSWORD -T /usr/bin/codesign # 5. Copying provisioning profile to Travis mkdir -p ~/Library/MobileDevice/Provisioning Profiles cp ./ios-travis-ci/profiles/*.mobileprovision ~/Library/MobileDevice/Provisioning Profiles/ ⛔️ ️ Marcio Klepacz, GetYourGuide iPhone SDK custom build per branch generate .ipa distribute
  • 20. Security Marcio Klepacz, GetYourGuide You can encrypt environment variables using Travis command line tool on your terminal: ~ $ travis encrypt ‘KEY_DIST_PASSWORD=abc123’ –add Passing the option “--add” will automatically add the secure key to your .travis.yml env: global: - secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf iPhone SDK custom build per branch generate .ipa distribute
  • 21. Travis Setup (.travis.yml) Marcio Klepacz, GetYourGuide Use iPhone SDK ✅ Doesn’t differentiate between branches Doesn’t archive Doesn’t distribute language: objective-c env: global: - secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf before_script: - ./scripts/import-key.sh script: - xctool -workspace MyNewProject.xcworkspace -scheme MySharedScheme -sdk iphoneos -configuration Beta iPhone SDK custom build per branch generate .ipa distribute
  • 22. Building (build_app.sh) # 1. xctool -workspace ${APP_NAME}.xcworkspace -scheme ${APP_NAME} -sdk iphonesimulator test … # 2. export RELEASE_SUFFIX=".release” # Bundle Identifier: # com.getyourguide.mobile.$(PRODUCT_NAME:rfc1034identifier)${BUNDLE_ID_SUFFIX}${RELEASE_ SUFFIX} … # 3 xctool -workspace ${APP_NAME}.xcworkspace -scheme ${APP_NAME} -sdk iphoneos -configuration ${APP_BUILD_CONFIG} OBJROOT=$PWD/build SYMROOT=$PWD/build Marcio Klepacz, GetYourGuide iPhone SDK custom build per branch generate .ipa distribute
  • 23. Travis Setup (.travis.yml) Marcio Klepacz, GetYourGuide Use iPhone SDK ✅ Differentiate between branches ✅ Doesn’t archive Doesn’t distribute … global: - secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf matrix: - APP_BUILD_CONFIG=Debug - APP_BUILD_CONFIG=Beta before_script: - ./scripts/import-key.sh script: - ./scripts/build-app.sh iPhone SDK custom build per branch generate .ipa distribute
  • 24. # 1. xcrun -sdk iphoneos PackageApplication -v ”$BUILD_DIR/$APP_NAME.app" -o ”$BUILD_DIR/$APP_NAME.ipa" --sign "$DEVELOPER_NAME" --embed ”$PROVISIONING_PROFILE" … # 2. release_notes=`git log --since=1.week --pretty=format:"%an - %s"` curl -F status="2" -F notify="0" -F release_type="2" -F notes="$release_notes" -F notes_type="0" -F "ipa=@$outputdir/$APP_NAME.ipa" -F "mobileprovision=@$provisioning_profile" -H "X-HockeyAppToken: ${HOCKEY_APP_TOKEN}" https://rink.hockeyapp.net/api/2/apps/upload # Uploading to HockeyApp Archiving and uploading (archive_and_upload.sh) Marcio Klepacz, GetYourGuide iPhone SDK custom build per branch generate .ipa distribute
  • 25. Travis Setup (.travis.yml) Marcio Klepacz, GetYourGuide Use iPhone SDK ✅ Differentiate between branches ✅ Archive ✅ Distribute ✅ language: objective-c env: global: - secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf before_script: - ./scripts/import-key.sh script: - ./scripts/build-app.sh after_success: - ./scripts/archive_and_upload.sh iPhone SDK custom build per branch generate .ipa distribute
  • 26. Move the scripts away from the app repository (Optional) Marcio Klepacz, GetYourGuide Maintenance 👍 Reusable 👍 Slower builds 👎 … git: submodules: false before_install: - git submodule init ios-travis-ci - git submodule update --remote --merge ios-travis-ci
  • 27. Result Marcio Klepacz, GetYourGuide Automate tasks App is distributed No manual configuration Different actions between branches 5 different apps to test concurrently (@banaslee’s phone)
  • 29. Some pain left Marcio Klepacz, GetYourGuide Provisioning profile included on project 👎 Very long shell script files 👎 Can’t scale 👎 Very Travis dependent👎
  • 30. Fastlane by @KrauseFx Marcio Klepacz, GetYourGuide Lets you define and run your deployment pipelines for different environments. Ruby gem Powerful toolchain Automates certificates and prov.profile installs Flexible Open source
  • 31. Fastlane / Example Marcio Klepacz, GetYourGuide # ../fastlane/Fastfile #... lane :deploy do # Installing certificates cert( development: true, username: "cibot@getyourguide.com") # Fetching and installing proviosning profiles sigh( adhoc: true, force: true, filename: "myFile.mobileprovision") # Build project gym( scheme: "MyApp", workspace: "MyApp.xcworkspace", configuration: ENV["APP_BUILD_CONFIG"]) # Shipping hockey( api_token: '...', ipa: './app.ipa', notes: "Changelog") end #...
  • 32. Fastlane / Example .travis.yml Marcio Klepacz, GetYourGuide language: objective-c env: global: - secure: Pz3cxDffsdafasf34324fdsf232fdsfdsf3fdsf script: - bundle exec fastlane deploy Scalable 👍 Faster 👍 Focused on Apple environment 👎
  • 33. Thanks for your time @marciok and marcio@getyourguide.com
  • 34. References Marcio Klepacz, GetYourGuide Travis CI for iOS - Mattes Groeger johanneswuerbach / .travis.yml - Johannes Würbach The OS X Build Environment - Travis CI Fastlane - Felix Krause

Editor's Notes

  1. Notes from Andreas:
  2. Agregate contents froms suppliers
  3. keywords: aggregate contents from suppliers and make it available as marketplace, (easy payment translations, content ….)
  4. Putting all requirements together
  5. - Run this script on our build to import the keys; Explain why you are not importing Apple cert
  6. - Run this script on our build to import the keys; Explain why you are not importing Apple cert
  7. How travis encryt
  8. Build specicy to a branch
  9. Automate release notes
  10. Iphone sdk and resolve some security issues
  11. Explain apps
  12. Agregate contents froms suppliers