Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and...

14
Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

Transcript of Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and...

Page 1: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

Continuous Integration with Jenkins and Shippable

Svetlana OmelkovaSoftware Engineer

Nevercode(GreenhouseCI)

Page 2: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software 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

Page 3: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 4: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 5: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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!!

Page 6: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 7: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

Continuous build cycleCode

Build

TestReport

Deploy

Page 8: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 9: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

NGROKHelps to create tunnels to localhost

● Good for testing● Do not use for production!!

Page 10: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 11: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 12: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

Cloud-hosted alternatives● Travis CI ● Circle CI● TeamCity from JetBrains

And many others

Page 13: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

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

Page 14: Continuous Integration with Jenkins and Shippable - ut · Continuous Integration with Jenkins and Shippable Svetlana Omelkova Software Engineer Nevercode(GreenhouseCI)

Thank you for your attention

In case of any questions:

[email protected]

[email protected]