SlideShare une entreprise Scribd logo
1  sur  35
Building iOS CI
Servers with Ansible
London Ansible Meetup
Shashikant Jagtap
Twitter: Shashikant86
Github: Shashikant86
Blog: http://shashikantjagtap.net/
Continuous Integration: iOS
Static Analysis : SwiftLint
Build : xcodebuild
Test : XCTest
Archive : ipa
Upload : iTunes Connect
iOS Self hosted CI
iOS Cloud CI
Setting up iOS CI Server
✤ Xcode & Command Line Tools
✤ Ruby for Cocoapods and Fastlane
✤ Homebrew packages
✤ macOS Defaults
✤ CI Server Specific tasks (Jenkins, Xcode Server,
TeamCity)
Manually Setting up CI Server
Why Provisioning ?
✤ Avoid repeating manual work
✤ Say No to “Works on My Machine”
✤ Infrastructure As Code
✤ Ability to reset and reconfigure CI infrastructure
What Are Choices ?
Hello Ansible
Challenges
✤ It’s not Linux
✤ Proprietary Softwares from Apple
✤ Not much Ansible roles for macOS
✤ Not much Ansible modules supporting macOS
packages
Ansible Automates Everything
Provisioning Xcode Installation
---
- name: Mount Xcode XIP from hosted Server
command: bash -c "mount_smbfs //{{ ansible_env.SAMBA_USER}}:{{ ansible_env.SAMBA_PASS
}}@our_server/Applications/xcode/ ~/samba/public/"
when: xcode_dir.stat.exists == False
- name: Install Xcode from XIP file Location
command: bash -c 'open -FWga "Archive Utility" --args ~/xcode_xip/{{ xcode_src }}'
- name: Move Xcode To Application
command: bash -c 'mv ~/xcode_xip/Xcode*.app /Applications/'
- name: accept license agreement
command: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -license
accept
become: yes
become_method: sudo
- name: install additional xcode components
command: installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/
XcodeSystemResources.pkg -target /
become: yes
Provisioning Homebrew Packages
---
- name: Ensure configured taps are tapped.
homebrew_tap: "tap={{ item }} state=present"
with_items: "{{ homebrew_taps }}"
- name: Ensure configured homebrew packages are installed.
homebrew: "name={{ item }} state=present"
with_items: "{{ homebrew_installed_packages }}"
- name: Install configured cask applications.
homebrew_cask:
name: "{{ item }}"
state: present
install_options: "appdir=/Applications"
with_items: "{{ homebrew_cask_apps }}"
when: configure_cask
Ruby + RVM for RubyGems
---
- name: Install RVM for the user
command: bash -c "curl -sSL https://get.rvm.io | bash
-s -- --ignore-dotfiles"
- name: Install ruby version
command: bash -c "~/.rvm/bin/rvm install
{{ ruby_version }} --with-zlib-dir={{ zlib_directory }}"
- name: Install Ruby Gems required for iOS app
developement
command: bash -c "~/.rvm/rubies/{{ ruby_version }}/
bin/gem install {{item}}"
with_items: "{{ rubygems_packages_to_install }}"
Provisioning macOS Defaults
---
- name: Setup macOS Sleep Mode
shell: "{{ item }}"
with_items: "{{ macos_sleep_options }}"
changed_when: false
- name: Software Updates
shell: "{{ item }}"
with_items:
"{{ macos_software_autoupdates }}"
changed_when: false
CI Server Specific Examples:
TeamCity
---
- name: "Download Teamcity Agent Package"
command: bash -c "curl {{ teamcity_agent_server_url }}/update/
buildAgent.zip --output /tmp/buildAgent.zip"
register: _teamcity_agent_package
- name: "Add TeamCity Agent configuration"
template:
src: "buildAgent.properties.j2"
dest: "{{ teamcity_agent_install_dir }}/conf/
buildAgent.properties"
mode: 0644
- name: Start the Teamcity Agent
command: bash -c "{{ teamcity_agent_install_dir }}/bin/
agent.sh start"
Example Playbook
- hosts: localhost
connection: local
xcode_src: Xcode_8.3.xip
ruby_version: ruby-2.3.0
zlib_directory: /usr/local/Cellar/zlib/1.2.11
rubygems_packages_to_install:
- bundler
teamcity_agent_install_dir: ~/TeamCity/buildAgent
teamcity_agent_server_url: https://our_teamcity_server.com
teamcity_agent_name: Our_iOS_Agent
macos_sleep_options:
- systemsetup -setsleep Never
- systemsetup -setharddisksleep Never
- systemsetup -setcomputersleep Never
macos_software_autoupdates:
- softwareupdate --schedule off
homebrew_installed_packages:
- autoconf
- openssl
- wget
homebrew_taps:
- homebrew/core
- caskroom/cask
tasks:
- include: tasks/ios_ansible.yml
Ansible Role on Galaxy : ansible-
ios-ci
✤ https://galaxy.ansible.com/Shashikant86/ansible-ios-
ci/
Source Code on GitHub: ansible-
ios-ci
✤ https://github.com/Shashikant86/ansible-ios-ci
Benefits
✤ Quick Setup of new CI Server Machine
✤ Ability to Switch between Xcode Version
✤ Ability to reset and rebuild CI Sever Machines
✤ Streamline configuration of local machine and CI
server
Blog Posts
✤ iOS CD with Fastlane and Ansible : Part 1
✤ http://shashikantjagtap.net/ios-continuous-
deployment-fastlane-ansible-part-1/
✤ iOS CD with Fastlane and Ansible: Part 2
✤ http://shashikantjagtap.net/ios-continuous-delivery-
fastlane-ansible-part-2/
Questions?
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible

Contenu connexe

Tendances

(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of usStefan Adolf
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with AnsibleBas Meijer
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
快快樂樂用Homestead
快快樂樂用Homestead快快樂樂用Homestead
快快樂樂用HomesteadChen Cheng-Wei
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationKumar Y
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleHenryk Konsek
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Alex S
 
Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Adam Hodowany
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestrationbcoca
 
Breaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationBreaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationTelescope_Inc
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karbanansiblebrno
 
Background processing with Resque
Background processing with ResqueBackground processing with Resque
Background processing with ResqueNicolas Blanco
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshopDavid Karban
 

Tendances (20)

(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with Ansible
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
快快樂樂用Homestead
快快樂樂用Homestead快快樂樂用Homestead
快快樂樂用Homestead
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whale
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
 
Ansible
AnsibleAnsible
Ansible
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
Breaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationBreaking Up With Your Data Center Presentation
Breaking Up With Your Data Center Presentation
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karban
 
Background processing with Resque
Background processing with ResqueBackground processing with Resque
Background processing with Resque
 
Sails js
Sails jsSails js
Sails js
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshop
 

Similaire à Provisioning iOS CI Server with Ansible

Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular applicationmirrec
 
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 2014biicode
 
Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102Heng-Yi Wu
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againFrank Rousseau
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby DevelopersAptible
 
Coocoo for Cocoapods
Coocoo for CocoapodsCoocoo for Cocoapods
Coocoo for CocoapodsAllan Davis
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...Jérôme Petazzoni
 
Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Halil Kaya
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endEzequiel Maraschio
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionPaolo latella
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发shaokun
 
Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Yury Pliashkou
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)Soshi Nemoto
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and LingvokotLingvokot
 

Similaire à Provisioning iOS CI Server with Ansible (20)

IOS 11 setup with appium latest
IOS 11 setup with appium  latestIOS 11 setup with appium  latest
IOS 11 setup with appium latest
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
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
 
Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy again
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby Developers
 
Coocoo for Cocoapods
Coocoo for CocoapodsCoocoo for Cocoapods
Coocoo for Cocoapods
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-end
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to production
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
DockerCoreNet
DockerCoreNetDockerCoreNet
DockerCoreNet
 

Plus de Shashikant Jagtap

NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework Shashikant Jagtap
 
SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App Shashikant Jagtap
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University Shashikant Jagtap
 
iOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS AppsiOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS AppsShashikant Jagtap
 
Dockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleShashikant Jagtap
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupShashikant Jagtap
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsiOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
Headless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationHeadless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationShashikant Jagtap
 
ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)Shashikant Jagtap
 
BDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabsBDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabsShashikant Jagtap
 
BDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and SauceBDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and SauceShashikant Jagtap
 
Test Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiTest Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiShashikant Jagtap
 

Plus de Shashikant Jagtap (17)

NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework
 
SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App
 
Full Stack Flutter Testing
Full Stack Flutter Testing Full Stack Flutter Testing
Full Stack Flutter Testing
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University
 
iOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS AppsiOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS Apps
 
Vapor london March 2018
Vapor london March 2018Vapor london March 2018
Vapor london March 2018
 
Dockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber Example
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsiOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and Saucelabs
 
Headless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationHeadless BDD & Responsive Test Automation
Headless BDD & Responsive Test Automation
 
Headless BDD
Headless BDDHeadless BDD
Headless BDD
 
ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)
 
Behat sauce
Behat sauceBehat sauce
Behat sauce
 
BDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabsBDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabs
 
BDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and SauceBDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and Sauce
 
Test Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiTest Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+Sahi
 

Dernier

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 

Dernier (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 

Provisioning iOS CI Server with Ansible

  • 1. Building iOS CI Servers with Ansible London Ansible Meetup Shashikant Jagtap Twitter: Shashikant86 Github: Shashikant86 Blog: http://shashikantjagtap.net/
  • 3. Static Analysis : SwiftLint
  • 7. Upload : iTunes Connect
  • 10. Setting up iOS CI Server ✤ Xcode & Command Line Tools ✤ Ruby for Cocoapods and Fastlane ✤ Homebrew packages ✤ macOS Defaults ✤ CI Server Specific tasks (Jenkins, Xcode Server, TeamCity)
  • 11. Manually Setting up CI Server
  • 12. Why Provisioning ? ✤ Avoid repeating manual work ✤ Say No to “Works on My Machine” ✤ Infrastructure As Code ✤ Ability to reset and reconfigure CI infrastructure
  • 15. Challenges ✤ It’s not Linux ✤ Proprietary Softwares from Apple ✤ Not much Ansible roles for macOS ✤ Not much Ansible modules supporting macOS packages
  • 17. Provisioning Xcode Installation --- - name: Mount Xcode XIP from hosted Server command: bash -c "mount_smbfs //{{ ansible_env.SAMBA_USER}}:{{ ansible_env.SAMBA_PASS }}@our_server/Applications/xcode/ ~/samba/public/" when: xcode_dir.stat.exists == False - name: Install Xcode from XIP file Location command: bash -c 'open -FWga "Archive Utility" --args ~/xcode_xip/{{ xcode_src }}' - name: Move Xcode To Application command: bash -c 'mv ~/xcode_xip/Xcode*.app /Applications/' - name: accept license agreement command: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -license accept become: yes become_method: sudo - name: install additional xcode components command: installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/ XcodeSystemResources.pkg -target / become: yes
  • 18. Provisioning Homebrew Packages --- - name: Ensure configured taps are tapped. homebrew_tap: "tap={{ item }} state=present" with_items: "{{ homebrew_taps }}" - name: Ensure configured homebrew packages are installed. homebrew: "name={{ item }} state=present" with_items: "{{ homebrew_installed_packages }}" - name: Install configured cask applications. homebrew_cask: name: "{{ item }}" state: present install_options: "appdir=/Applications" with_items: "{{ homebrew_cask_apps }}" when: configure_cask
  • 19. Ruby + RVM for RubyGems --- - name: Install RVM for the user command: bash -c "curl -sSL https://get.rvm.io | bash -s -- --ignore-dotfiles" - name: Install ruby version command: bash -c "~/.rvm/bin/rvm install {{ ruby_version }} --with-zlib-dir={{ zlib_directory }}" - name: Install Ruby Gems required for iOS app developement command: bash -c "~/.rvm/rubies/{{ ruby_version }}/ bin/gem install {{item}}" with_items: "{{ rubygems_packages_to_install }}"
  • 20. Provisioning macOS Defaults --- - name: Setup macOS Sleep Mode shell: "{{ item }}" with_items: "{{ macos_sleep_options }}" changed_when: false - name: Software Updates shell: "{{ item }}" with_items: "{{ macos_software_autoupdates }}" changed_when: false
  • 21. CI Server Specific Examples: TeamCity --- - name: "Download Teamcity Agent Package" command: bash -c "curl {{ teamcity_agent_server_url }}/update/ buildAgent.zip --output /tmp/buildAgent.zip" register: _teamcity_agent_package - name: "Add TeamCity Agent configuration" template: src: "buildAgent.properties.j2" dest: "{{ teamcity_agent_install_dir }}/conf/ buildAgent.properties" mode: 0644 - name: Start the Teamcity Agent command: bash -c "{{ teamcity_agent_install_dir }}/bin/ agent.sh start"
  • 22. Example Playbook - hosts: localhost connection: local xcode_src: Xcode_8.3.xip ruby_version: ruby-2.3.0 zlib_directory: /usr/local/Cellar/zlib/1.2.11 rubygems_packages_to_install: - bundler teamcity_agent_install_dir: ~/TeamCity/buildAgent teamcity_agent_server_url: https://our_teamcity_server.com teamcity_agent_name: Our_iOS_Agent macos_sleep_options: - systemsetup -setsleep Never - systemsetup -setharddisksleep Never - systemsetup -setcomputersleep Never macos_software_autoupdates: - softwareupdate --schedule off homebrew_installed_packages: - autoconf - openssl - wget homebrew_taps: - homebrew/core - caskroom/cask tasks: - include: tasks/ios_ansible.yml
  • 23. Ansible Role on Galaxy : ansible- ios-ci ✤ https://galaxy.ansible.com/Shashikant86/ansible-ios- ci/
  • 24. Source Code on GitHub: ansible- ios-ci ✤ https://github.com/Shashikant86/ansible-ios-ci
  • 25. Benefits ✤ Quick Setup of new CI Server Machine ✤ Ability to Switch between Xcode Version ✤ Ability to reset and rebuild CI Sever Machines ✤ Streamline configuration of local machine and CI server
  • 26. Blog Posts ✤ iOS CD with Fastlane and Ansible : Part 1 ✤ http://shashikantjagtap.net/ios-continuous- deployment-fastlane-ansible-part-1/ ✤ iOS CD with Fastlane and Ansible: Part 2 ✤ http://shashikantjagtap.net/ios-continuous-delivery- fastlane-ansible-part-2/