SlideShare a Scribd company logo
1 of 21
Download to read offline
TRAVIS CI
% git add
% git commit
% git push
Service hook
Mac VM
Xcode
• Build
• Test
• Deploy
• Notify
Setup
Availability
Speed
Easy Manual
Cloud Private network
DependsMedium
Trouble shooting Hard Easy
Cost
Free for open source
…..$129/month for private
repo
Setup
% gem install travis
% vim .travis.yml
language: objective-c
script:
- make
notifications:
email: false
all:
xcodebuild -arch "i386" -configuration
"Debug" -sdk "iphonesimulator" build |
xcpretty
Code Sign
• Encrypt your keys, certificates, and provisioning
profiles.
• Commit encrypted files to github
• Decrypt and install before build
% openssl aes-256-cbc -k "foo" -in certs/dist.cer -out certs/dist.cer.enc -a
% openssl aes-256-cbc -k "foo" -in certs/dist.p12 -out certs/dist.p12.enc -a
% openssl aes-256-cbc -k "foo" -in certs/dev.cer -out certs/dev.cer.enc -a
% openssl aes-256-cbc -k "foo" -in certs/dev.p12 -out certs/dev.p12.enc -a
% openssl aes-256-cbc -k “foo” -in certs/AppStore.mobileprovision -out certs/AppStore.mobileprovision.enc -a
% openssl aes-256-cbc -k “foo” -in certs/AdHoc.mobileprovision -out certs/AdHoc.mobileprovision.enc -a
before_script:
- openssl aes-256-cbc -k "$SECRET" -in certs/AdHoc.mobileprovision.enc -d -a -out certs/AdHoc.mobileprovision
- openssl aes-256-cbc -k "$SECRET" -in certs/AppStore.mobileprovision.enc -d -a -out certs/AppStore.mobileprovision
- openssl aes-256-cbc -k "$SECRET" -in certs/dist.cer.enc -d -a -out certs/dist.cer
- openssl aes-256-cbc -k "$SECRET" -in certs/dist.p12.enc -d -a -out certs/dist.p12
- openssl aes-256-cbc -k "$SECRET" -in certs/dist.cer.enc -d -a -out certs/dist.cer
- openssl aes-256-cbc -k "$SECRET" -in certs/dist.p12.enc -d -a -out certs/dist.p12
Encrypt
Decrypt
Export
% travis encrypt “SECRET=foo” --add
env:
global:
- secure: eLo92Sw8KejuadMDTgY
+bMAPow3D4zqkhBqXm8oUDctZn3qOJ5iJgMrNxfhSUx+AX/
jiT07+U0vicHWRjGtkIGBeZJ8FVJL7NZQbIbqa80g0+MT4CNk4bumUphY0
w+OOzsY8V4OKR90mUmzz3bVN8/ROFBZygeYBdiLnmhoQ93E=
- secure: fGoTHN29GtCiux/
aGJ2wm3NYtbyIRh0vnfoJafYdzWC6lj0PWrv0KVF31rHA56f7wPVLFnLrx
2UhNzZHfMaavD9QSGVYNOcE2AVXuaRWnMrKmCjAkCW/7qnePwxcgcQTV
+zQJTV523G4nDbWQMoQ9wugzTsxhj+Ob+ZF0cGEXUA=
Use command line
#!/bin/sh
# create keychain
security create-keychain -p travis ios-build.keychain
security default-keychain -s ios-build.keychain
security unlock-keychain -p travis ios-build.keychain
security set-keychain-settings -t 3600 -l ~/Library/Keychains/ios-
build.keychain
# Certificate & Private key
security import ./certs/cert.cer -k ~/Library/Keychains/ios-
build.keychain -T /usr/bin/codesign
security import ./certs/key.p12 -k ~/Library/Keychains/ios-
build.keychain -P "$KEY_PASSWORD" -T /usr/bin/codesign
# Provisioning profiles
mkdir -p ~/Library/MobileDevice/Provisioning Profiles
cp "./certs/AppStore.mobileprovision" ~/Library/MobileDevice/
Provisioning Profiles/
cp "./certs/AdHoc.mobileprovision" ~/Library/MobileDevice/
Provisioning Profiles/
language: objective-c
osx_image: xcode6.4
before_install:
- gem install fastlane
before_script:
- openssl aes-256-cbc -k "$SECRET" -in certs/EMQAppStore.mobileprovision.enc -d -a -out certs/
EMQAppStore.mobileprovision
- openssl aes-256-cbc -k "$SECRET" -in certs/EMQDev.mobileprovision.enc -d -a -out certs/
EMQDev.mobileprovision
- openssl aes-256-cbc -k "$SECRET" -in certs/cert.cer.enc -d -a -out certs/cert.cer
- openssl aes-256-cbc -k "$SECRET" -in certs/dev-cert.cer.enc -d -a -out certs/dev-cert.cer
- openssl aes-256-cbc -k "$SECRET" -in certs/key.p12.enc -d -a -out certs/key.p12
- openssl aes-256-cbc -k "$SECRET" -in certs/dev-key.p12.enc -d -a -out certs/dev-key.p12
- sh ./certs/install-keys.sh
script:
- make
podfile: iOSApp/Podfile
notifications:
email: false
slack: emq-inc:kPgGUXItHsgRsNtc77Fz3f3P
env:
global:
- secure: OqyOY/I8QoucKb4uWY9xu9pkXgFoTahqiRl3BLOCJEbgKMKoUyDnk7N/ALktHp2S/NuB4zj5PNA50Lhb/
zAnI7cTgZT0qEDJv2yDIM/j0wQFEHbKQafEHDWj2vAnook8OBpXiiykqWIb1dKgXCjzcEDjxhSo5V6V5IsdFHVAAew=
- secure: gAw0juDvfHolj0zg93f2qnCFBxetvFIBTsMCgHMzStk0DyKrsh4IV
+1x2CCqSFWo5q4EbXmsKKeyQKqfreIbbQTmZkAmXjIiVg70LDVgsqk5COWUTRgn21pUGWUFosxAkSZZghEf0o3Z62jA6FgeJkCkP
cSLszuE0Qlbiq0SFSw=
- secure: eLo92Sw8KejuadMDTgY+bMAPow3D4zqkhBqXm8oUDctZn3qOJ5iJgMrNxfhSUx+AX/
jiT07+U0vicHWRjGtkIGBeZJ8FVJL7NZQbIbqa80g0+MT4CNk4bumUphY0w+OOzsY8V4OKR90mUmzz3bVN8/
ROFBZygeYBdiLnmhoQ93E=
- secure: fGoTHN29GtCiux/
aGJ2wm3NYtbyIRh0vnfoJafYdzWC6lj0PWrv0KVF31rHA56f7wPVLFnLrx2UhNzZHfMaavD9QSGVYNOcE2AVXuaRWnMrKmCjAkCW
/7qnePwxcgcQTV+zQJTV523G4nDbWQMoQ9wugzTsxhj+Ob+ZF0cGEXUA=
xcodebuild -arch "i386" -configuration "Debug" -
sdk "iphonesimulator" build | xcpretty
fastlane build
Setup
% sudo gem install fastlane
% fastlane init
% vim fastlane/Appfile
% vim fastlane/Fastfile
def unit_test
xctest(
workspace: 'EMQ.xcworkspace',
scheme: 'EMQ-Demo',
configuration: 'Demo',
sdk: "iphonesimulator",
arch: "i386",
reports:[{
report: 'html',
output: './test-report.html'
}]
)
slack(
message: 'EMQ iOS App Unit Test',
channel: '#dev-ios',
default_payloads: [:test_result, :git_branch, :git_author, :last_git_commit],
)
end
before_all do
ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABCDEFG/ABCDEFG/ABCDEFG"
clean_build_artifacts
cocoapods
end
lane :deliver_demo do
#increment_build_number
sigh
xcodebuild(
workspace: 'EMQ.xcworkspace',
configuration: 'Demo',
scheme: 'EMQ-Demo',
identity: 'iPhone Distribution: EMQ Limited (28HUT34N52)',
clean: true
)
unit_test
xcarchive(
workspace: 'EMQ.xcworkspace',
configuration: 'Demo',
scheme: 'EMQ-Demo',
embed: '../certs/EMQAppStore.mobileprovision',
identity: 'iPhone Distribution: EMQ Limited (28HUT34N52)'
)
xcexport
resign(
ipa: 'EMQ-Demo.ipa',
signing_identity: 'iPhone Distribution: EMQ Limited (28HUT34N52)',
provisioning_profile: '../certs/EMQAppStore.mobileprovision',
)
testflight(skip_deploy: true)
end
all:
ifeq ($(TRAVIS_PULL_REQUEST), false)
fastlane test
else
agvtool new-version -all $(TRAVIS_BUILD_NUMBER)
fastlane deliver_demo
endif
xcodebuild -arch "i386" -configuration
"Debug" -sdk "iphonesimulator" build |
xcpretty
fastlane build
Trouble shooting
• Easy setup
• No maintenance
• Github integration
• Bad for trouble shooting
• Automate your flows
• Flexible, customizable
• Life saver
• Great for CI

More Related Content

What's hot

ApppiumDoc_version2015
ApppiumDoc_version2015ApppiumDoc_version2015
ApppiumDoc_version2015
Amit DEWAN
 

What's hot (20)

Dockerize node.js application
Dockerize node.js applicationDockerize node.js application
Dockerize node.js application
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
 
ApppiumDoc_version2015
ApppiumDoc_version2015ApppiumDoc_version2015
ApppiumDoc_version2015
 
Multitasking in iOS 7
Multitasking in iOS 7Multitasking in iOS 7
Multitasking in iOS 7
 
Kadecot APIs overview
Kadecot APIs overviewKadecot APIs overview
Kadecot APIs overview
 
React Native in Production
React Native in ProductionReact Native in Production
React Native in Production
 
Javascript Essentials - Cisco Live Barcelona 2019
Javascript Essentials - Cisco Live Barcelona 2019Javascript Essentials - Cisco Live Barcelona 2019
Javascript Essentials - Cisco Live Barcelona 2019
 
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
 
Breaking iOS Apps using Cycript
Breaking iOS Apps using CycriptBreaking iOS Apps using Cycript
Breaking iOS Apps using Cycript
 
Banfootguns devseccon 2019
Banfootguns devseccon 2019Banfootguns devseccon 2019
Banfootguns devseccon 2019
 
Formacion en movilidad: Conceptos de desarrollo en iOS (I)
Formacion en movilidad: Conceptos de desarrollo en iOS (I) Formacion en movilidad: Conceptos de desarrollo en iOS (I)
Formacion en movilidad: Conceptos de desarrollo en iOS (I)
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications security
 
IOS 11 setup with appium latest
IOS 11 setup with appium  latestIOS 11 setup with appium  latest
IOS 11 setup with appium latest
 
The Hookshot: Runtime Exploitation
The Hookshot: Runtime ExploitationThe Hookshot: Runtime Exploitation
The Hookshot: Runtime Exploitation
 
Pentesting iOS Apps
Pentesting iOS AppsPentesting iOS Apps
Pentesting iOS Apps
 
Hardening Your Config Management - Security and Attack Vectors in Config Mana...
Hardening Your Config Management - Security and Attack Vectors in Config Mana...Hardening Your Config Management - Security and Attack Vectors in Config Mana...
Hardening Your Config Management - Security and Attack Vectors in Config Mana...
 
Selenium Automation at Incapsula
Selenium Automation at IncapsulaSelenium Automation at Incapsula
Selenium Automation at Incapsula
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
 
PhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser
PhoneGap day 2016 EU: Simulating Cordova Plugins in the BrowserPhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser
PhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser
 

Viewers also liked

Developer sharing about xing
Developer sharing about xingDeveloper sharing about xing
Developer sharing about xing
Steven Shen
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
Yukiya Nakagawa
 

Viewers also liked (15)

利用 iOS App 技術創業的 13 個方法
利用 iOS App 技術創業的 13 個方法利用 iOS App 技術創業的 13 個方法
利用 iOS App 技術創業的 13 個方法
 
Developer sharing about xing
Developer sharing about xingDeveloper sharing about xing
Developer sharing about xing
 
Deploy your app with one Slack command
Deploy your app with one Slack commandDeploy your app with one Slack command
Deploy your app with one Slack command
 
Análisis lectura ¿qué es una constitución?
Análisis lectura   ¿qué es una constitución?Análisis lectura   ¿qué es una constitución?
Análisis lectura ¿qué es una constitución?
 
The Mobile ToolChain with Fastlane - Code Red Talk at RedBlackTree
The Mobile ToolChain with Fastlane - Code Red Talk at RedBlackTreeThe Mobile ToolChain with Fastlane - Code Red Talk at RedBlackTree
The Mobile ToolChain with Fastlane - Code Red Talk at RedBlackTree
 
IBM Innovate DevOps for Mobile Apps
IBM Innovate DevOps for Mobile Apps IBM Innovate DevOps for Mobile Apps
IBM Innovate DevOps for Mobile Apps
 
DevOps for the Mobile Enterprise: Test and Deploy
DevOps for the Mobile Enterprise: Test and DeployDevOps for the Mobile Enterprise: Test and Deploy
DevOps for the Mobile Enterprise: Test and Deploy
 
Exercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the EnterpriseExercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the Enterprise
 
你的程式開發初體驗 (以Swift為例)
你的程式開發初體驗 (以Swift為例)你的程式開發初體驗 (以Swift為例)
你的程式開發初體驗 (以Swift為例)
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
 
iOS 入門教學
iOS 入門教學iOS 入門教學
iOS 入門教學
 
Continuous Delivery with fastlane
Continuous Delivery with fastlaneContinuous Delivery with fastlane
Continuous Delivery with fastlane
 
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
React-Native for multi-platform mobile applications @ Codemotion Rome 2017React-Native for multi-platform mobile applications @ Codemotion Rome 2017
React-Native for multi-platform mobile applications @ Codemotion Rome 2017
 
Lean Startup for Agile Product Management
Lean Startup for Agile Product ManagementLean Startup for Agile Product Management
Lean Startup for Agile Product Management
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
 

Similar to Travis and fastlane

Similar to Travis and fastlane (20)

Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
OpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloud
OpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloudOpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloud
OpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloud
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
How we integrate & deploy Mobile Apps with Travis CI part 2
How we integrate & deploy Mobile Apps with Travis CI part 2How we integrate & deploy Mobile Apps with Travis CI part 2
How we integrate & deploy Mobile Apps with Travis CI part 2
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'
 
NetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16xNetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16x
 
Docker remote-api
Docker remote-apiDocker remote-api
Docker remote-api
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
Composer, putting dependencies on the score
Composer, putting dependencies on the scoreComposer, putting dependencies on the score
Composer, putting dependencies on the score
 
Atmosphere Conference 2015: Taming the Modern Datacenter
Atmosphere Conference 2015: Taming the Modern DatacenterAtmosphere Conference 2015: Taming the Modern Datacenter
Atmosphere Conference 2015: Taming the Modern Datacenter
 
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
 
Commcon 2018
Commcon 2018Commcon 2018
Commcon 2018
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Modern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSDModern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSD
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Travis and fastlane

  • 2. % git add % git commit % git push Service hook Mac VM Xcode • Build • Test • Deploy • Notify
  • 3. Setup Availability Speed Easy Manual Cloud Private network DependsMedium Trouble shooting Hard Easy Cost Free for open source …..$129/month for private repo
  • 4. Setup % gem install travis % vim .travis.yml language: objective-c script: - make notifications: email: false
  • 5. all: xcodebuild -arch "i386" -configuration "Debug" -sdk "iphonesimulator" build | xcpretty
  • 6. Code Sign • Encrypt your keys, certificates, and provisioning profiles. • Commit encrypted files to github • Decrypt and install before build
  • 7. % openssl aes-256-cbc -k "foo" -in certs/dist.cer -out certs/dist.cer.enc -a % openssl aes-256-cbc -k "foo" -in certs/dist.p12 -out certs/dist.p12.enc -a % openssl aes-256-cbc -k "foo" -in certs/dev.cer -out certs/dev.cer.enc -a % openssl aes-256-cbc -k "foo" -in certs/dev.p12 -out certs/dev.p12.enc -a % openssl aes-256-cbc -k “foo” -in certs/AppStore.mobileprovision -out certs/AppStore.mobileprovision.enc -a % openssl aes-256-cbc -k “foo” -in certs/AdHoc.mobileprovision -out certs/AdHoc.mobileprovision.enc -a before_script: - openssl aes-256-cbc -k "$SECRET" -in certs/AdHoc.mobileprovision.enc -d -a -out certs/AdHoc.mobileprovision - openssl aes-256-cbc -k "$SECRET" -in certs/AppStore.mobileprovision.enc -d -a -out certs/AppStore.mobileprovision - openssl aes-256-cbc -k "$SECRET" -in certs/dist.cer.enc -d -a -out certs/dist.cer - openssl aes-256-cbc -k "$SECRET" -in certs/dist.p12.enc -d -a -out certs/dist.p12 - openssl aes-256-cbc -k "$SECRET" -in certs/dist.cer.enc -d -a -out certs/dist.cer - openssl aes-256-cbc -k "$SECRET" -in certs/dist.p12.enc -d -a -out certs/dist.p12 Encrypt Decrypt Export
  • 8. % travis encrypt “SECRET=foo” --add env: global: - secure: eLo92Sw8KejuadMDTgY +bMAPow3D4zqkhBqXm8oUDctZn3qOJ5iJgMrNxfhSUx+AX/ jiT07+U0vicHWRjGtkIGBeZJ8FVJL7NZQbIbqa80g0+MT4CNk4bumUphY0 w+OOzsY8V4OKR90mUmzz3bVN8/ROFBZygeYBdiLnmhoQ93E= - secure: fGoTHN29GtCiux/ aGJ2wm3NYtbyIRh0vnfoJafYdzWC6lj0PWrv0KVF31rHA56f7wPVLFnLrx 2UhNzZHfMaavD9QSGVYNOcE2AVXuaRWnMrKmCjAkCW/7qnePwxcgcQTV +zQJTV523G4nDbWQMoQ9wugzTsxhj+Ob+ZF0cGEXUA= Use command line
  • 9. #!/bin/sh # create keychain security create-keychain -p travis ios-build.keychain security default-keychain -s ios-build.keychain security unlock-keychain -p travis ios-build.keychain security set-keychain-settings -t 3600 -l ~/Library/Keychains/ios- build.keychain # Certificate & Private key security import ./certs/cert.cer -k ~/Library/Keychains/ios- build.keychain -T /usr/bin/codesign security import ./certs/key.p12 -k ~/Library/Keychains/ios- build.keychain -P "$KEY_PASSWORD" -T /usr/bin/codesign # Provisioning profiles mkdir -p ~/Library/MobileDevice/Provisioning Profiles cp "./certs/AppStore.mobileprovision" ~/Library/MobileDevice/ Provisioning Profiles/ cp "./certs/AdHoc.mobileprovision" ~/Library/MobileDevice/ Provisioning Profiles/
  • 10. language: objective-c osx_image: xcode6.4 before_install: - gem install fastlane before_script: - openssl aes-256-cbc -k "$SECRET" -in certs/EMQAppStore.mobileprovision.enc -d -a -out certs/ EMQAppStore.mobileprovision - openssl aes-256-cbc -k "$SECRET" -in certs/EMQDev.mobileprovision.enc -d -a -out certs/ EMQDev.mobileprovision - openssl aes-256-cbc -k "$SECRET" -in certs/cert.cer.enc -d -a -out certs/cert.cer - openssl aes-256-cbc -k "$SECRET" -in certs/dev-cert.cer.enc -d -a -out certs/dev-cert.cer - openssl aes-256-cbc -k "$SECRET" -in certs/key.p12.enc -d -a -out certs/key.p12 - openssl aes-256-cbc -k "$SECRET" -in certs/dev-key.p12.enc -d -a -out certs/dev-key.p12 - sh ./certs/install-keys.sh script: - make podfile: iOSApp/Podfile notifications: email: false slack: emq-inc:kPgGUXItHsgRsNtc77Fz3f3P env: global: - secure: OqyOY/I8QoucKb4uWY9xu9pkXgFoTahqiRl3BLOCJEbgKMKoUyDnk7N/ALktHp2S/NuB4zj5PNA50Lhb/ zAnI7cTgZT0qEDJv2yDIM/j0wQFEHbKQafEHDWj2vAnook8OBpXiiykqWIb1dKgXCjzcEDjxhSo5V6V5IsdFHVAAew= - secure: gAw0juDvfHolj0zg93f2qnCFBxetvFIBTsMCgHMzStk0DyKrsh4IV +1x2CCqSFWo5q4EbXmsKKeyQKqfreIbbQTmZkAmXjIiVg70LDVgsqk5COWUTRgn21pUGWUFosxAkSZZghEf0o3Z62jA6FgeJkCkP cSLszuE0Qlbiq0SFSw= - secure: eLo92Sw8KejuadMDTgY+bMAPow3D4zqkhBqXm8oUDctZn3qOJ5iJgMrNxfhSUx+AX/ jiT07+U0vicHWRjGtkIGBeZJ8FVJL7NZQbIbqa80g0+MT4CNk4bumUphY0w+OOzsY8V4OKR90mUmzz3bVN8/ ROFBZygeYBdiLnmhoQ93E= - secure: fGoTHN29GtCiux/ aGJ2wm3NYtbyIRh0vnfoJafYdzWC6lj0PWrv0KVF31rHA56f7wPVLFnLrx2UhNzZHfMaavD9QSGVYNOcE2AVXuaRWnMrKmCjAkCW /7qnePwxcgcQTV+zQJTV523G4nDbWQMoQ9wugzTsxhj+Ob+ZF0cGEXUA=
  • 11.
  • 12.
  • 13. xcodebuild -arch "i386" -configuration "Debug" - sdk "iphonesimulator" build | xcpretty fastlane build
  • 14. Setup % sudo gem install fastlane % fastlane init % vim fastlane/Appfile % vim fastlane/Fastfile
  • 15. def unit_test xctest( workspace: 'EMQ.xcworkspace', scheme: 'EMQ-Demo', configuration: 'Demo', sdk: "iphonesimulator", arch: "i386", reports:[{ report: 'html', output: './test-report.html' }] ) slack( message: 'EMQ iOS App Unit Test', channel: '#dev-ios', default_payloads: [:test_result, :git_branch, :git_author, :last_git_commit], ) end before_all do ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABCDEFG/ABCDEFG/ABCDEFG" clean_build_artifacts cocoapods end
  • 16. lane :deliver_demo do #increment_build_number sigh xcodebuild( workspace: 'EMQ.xcworkspace', configuration: 'Demo', scheme: 'EMQ-Demo', identity: 'iPhone Distribution: EMQ Limited (28HUT34N52)', clean: true ) unit_test xcarchive( workspace: 'EMQ.xcworkspace', configuration: 'Demo', scheme: 'EMQ-Demo', embed: '../certs/EMQAppStore.mobileprovision', identity: 'iPhone Distribution: EMQ Limited (28HUT34N52)' ) xcexport resign( ipa: 'EMQ-Demo.ipa', signing_identity: 'iPhone Distribution: EMQ Limited (28HUT34N52)', provisioning_profile: '../certs/EMQAppStore.mobileprovision', ) testflight(skip_deploy: true) end
  • 17.
  • 18. all: ifeq ($(TRAVIS_PULL_REQUEST), false) fastlane test else agvtool new-version -all $(TRAVIS_BUILD_NUMBER) fastlane deliver_demo endif
  • 19. xcodebuild -arch "i386" -configuration "Debug" -sdk "iphonesimulator" build | xcpretty fastlane build Trouble shooting
  • 20.
  • 21. • Easy setup • No maintenance • Github integration • Bad for trouble shooting • Automate your flows • Flexible, customizable • Life saver • Great for CI