Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
Continuous Integration with Jenkins and Shippable
Svetlana OmelkovaSoftware Engineer
Nevercode(GreenhouseCI)
Installation● Install VirtualBox (5.1)● (https://www.virtualbox.org/wiki/Downloads)● Install Vagrant
(https://www.vagrantup.com/downloads.html)
● Clone (or download) https://github.com/omelkova/ci_workshop.git
cd box
vagrant up
vagrant plugin install vagrant-vbguest
About the speaker● 4 semesters worked as a TA for Software Testing course
● 2 semesters - TA for Software Engineering course
● “Intro to programming with Python”
● Currently working in “Nevercode” (former GreenhouseCI)○ CI service for mobile apps
○ Support Android, iOS, Cordova and Ionic frameworks
Agenda● Continuous integration introduction● Jenkins installation on virtual machine
○ Setup build for POS application○ Setup webhooks to trigger builds○ Setup build status notification
● Shippable installation (automatic builds + notifications)● Compare self-hosted and cloud-hosted solutions
What is Continuous Integration“Continuous Integrations doesn't get rid of bugs, but it does make them dramatically easier to find and remove.”
-Martin Fowler
● CI is a software development practice aimed to prevent integration problems
● Every code change immediately analysed after committing to the VCS
● Bugs can be isolated to a specific code changes and fixed immediately
● Automate your development process as much as possible!!
Jenkins● Continuous integration and build server● Written in Java● Can be used to automate such tasks as build, test,
distribute software● Server based system running in servlet container(e.g
Tomcat, Jetty)● Completely free and open source/ Commercial support● Has tons of plugins, support everything● May be a problem to configure
Continuous build cycleCode
Build
TestReport
Deploy
VirtualBox and VagrantThe build server has been pre-packaged using VirtualBox and Vagrant
VM is based on Debian8-x64 OS and contains:
● GIT● Java 8● Jenkins CI server
Useful commands:
○ vagrant up○ vagrant ssh○ vagrant suspend○ vagrant resume○ vagrant halt○ vagrant destroy
NGROKHelps to create tunnels to localhost
● Good for testing● Do not use for production!!
Webhook● Webhook is a method to augment the behaviour of a web app
with custom callbacks● Callbacks can be managed by any third-party, who may not
be affiliated with the originating web app
git add .git commit
git push webhook trigger build
SHIPPABLE● Is a cloud platform that provides hosted CI, deployment
and testing to GitHub and Bitbucket repositories● Free for open source and one concurrent build● Pay per minion per month
○ Build minions are the virtual containers that run builds○ Allow to run builds in parallel
Cloud-hosted alternatives● Travis CI ● Circle CI● TeamCity from JetBrains
And many others
Comparison between self-hosted and cloud-hosted CISelf-hosted CI Cloud-hosted CI
Application Service
“Free” of charge (need to maintain) Commercial (usually free for open-source)
Highly flexible Easy to use
Install all you need yourself Pre-installed build and test tools
Need to deal with security issues yourself
Need to provide uname/pwd; ssh keys for your repos
Fast (usually) Builds can be queued