SlideShare a Scribd company logo
CONTINUOUS INTEGRATION
TEST AND DEPLOYMENT AUTOMATION
FOCUS
• WHY CONTINUOUS INTEGRATION

• HOW TO INTEGRATE CONTINUOUS INTEGRATION IN YOUR WORKFLOW

• GET TO KNOW JENKINS AND SONAR

• DEPLOYMENT PIPELINE - DEMO
WHY CONTINUOUS INTEGRATION
THE PROBLEM OF DELIVERING SOFTWARE

IF SOMEBODY THINKS OF A GOOD IDEA,

HOW DO WE DELIVER IT TO USERS AS QUICKLY AS POSSIBLE

WITHOUT BREAKING EVERYTHING?
BEHAVIOUR OF SOFTWARE PROJECT
• FOR LONG PERIODS OF TIME DURING DEVELOPMENT, THE
APPLICATION IS NOT IN A WORKING STATE

• NOBODY IS INTERESTED IN RUNNING THE WHOLE APPLICATION UNTIL
IT’S FINISHED

• NOBODY TRIES TO RUN THE APPLICATION IN A PRODUCTION-LIKE
ENVIRONMENT

• DOUBLY TRUE OF LONG LIVED BRANCHES OR UAT TESTING THAT’S
DEFERRED TO THE END
RELEASE ANTI-PATTERNS - MANUAL DEPLOY
SIGNS:


EFFECTS:


• DETAILED DEPLOYMENT
PROCEDURE


• ERRORS WILL OCCUR EVERY TIME
THEY ARE PERFORMED. THE ONLY
QUESTION IS WHETHER OR NOT THE
ERRORS ARE SIGNIFICANT


• MANUAL REGRESSION TESTING

• RELEASE THAT TAKE MORE THAN A
FEW MINUTES

• UNPREDICTABLE RELEASE - HAS TO
BE ROLLED BACK

• DEPLOYMENT WINDOWS


!
!
!

• NOT REPEATABLE OR RELIABLE

• MANUAL DEPLOYMENTS DEPENDS
ON DEPLOYMENT EXPERTS

• BORING AND REPETITIVE

• EXPENSIVE MANUAL TESTING

• NOT AUDITABLE
CAN WE DO BETTER?
SOFTWARE RELEASES CAN AND SHOULD BE:

• LOW-RISK
• FREQUENT
• CHEAP
• RAPID
• PREDICTABLE
HOW?
• AUTOMATED - IF THE BUILD, DEPLOY, TEST AND RELEASE IS NOT
AUTOMATED, IT IS NOT REPEATABLE. IT WILL BE DIFFERENT EVERY
TIME. RELEASING SHOULD BE AN ENGINEERING DISCIPLINE

• FREQUENT - IF THE RELEASE IS FREQUENT, THE DELTA BETWEEN
RELEASE WILL BE SMALL.

• EASIER TO ROLL BACK

• FASTER FEEDBACK
BENEFITS
• REPEATABLE, RELIABLE, PREDICTABLE RELEASE PROCESS
• ERROR REDUCTION - NO HUMAN BEING OR TEAM OF HUMAN BEING
CAN SPOT A BREAKING CHANGE IN MILLIONS OF LINES OF CODE - LET
THE COMPUTER DO THAT

• LOWERING STRESS - PEACE OF MIND THAT THE FEATURES WORK

• FLEXIBLE DEPLOYMENT SCHEDULES - DEPLOY AT THE PUSH OF A
BUTTON —YES EVEN ON FRIDAY @ 1:30PM
“

THE FIRST TIME YOU DO
AUTOMATION, IT WILL BE PAINFUL
— BUT IT WILL BECOME EASIER
AND THE BENEFITS WILL BE
INCALCULABLE

”
HOW TO INTEGRATE CI INTO YOUR
WORKFLOW
“

IN SOFTWARE, WHEN SOMETHING
IS PAINFUL, THE WAY TO REDUCE
THE PAIN IS TO DO IT MORE
FREQUENTLY, NOT LESS

”
PRINCIPLES OF SOFTWARE DELIVERY
SOFTWARE CAN BE BROKEN DOWN INTO 4 COMPONENTS:

• HOST ENVIRONMENT
• CONFIGURATION
• CODE
• DATA
KEEP EVERYTHING IN VERSION CONTROL!!!
HOST ENVIRONMENT
• CAN I REPRODUCE ANY OF MY ENVIRONMENTS (OS, SOFTWARE
INSTALLED, CONFIGURATION)

• CAN I MAKE AN INCREMENTAL CHANGE TO THESE ENVIRONMENTS

• CAN I TRACE BACK THIS CHANGE, WHO MADE IT AND WHEN THEY
MADE IT

• IS IT EASY FOR EVERY MEMBER TO APPLY THESE CHANGES
CONFIGURATION
TREAT YOUR CONFIGURATION LIKE CODE

• BASED ON APPLICATION AND ENVIRONMENT, IT SHOULD BE EASY TO
SEE WHAT THE OPTIONS ARE

• USE CLEAR NAMING CONVENTIONS

• MODULAR AND ENCAPSULATED

• DRY / KISS

• TESTED
“

IT SHOULD ALWAYS BE CHEAPER
TO CREATE A NEW ENVIRONMENT
THAN TO REPAIR AN OLD ONE

”
CODE
• MUST BE IN VERSION CONTROL

• MUST HAVE A TESTING STRATEGY ( > 70% COVERAGE)

• USE MEANINGFUL COMMIT MESSAGES

• BRANCH BY ABSTRACTION
• USE DEPENDENCY INJECTION

• TDD
“

TEST DRIVEN DEVELOPMENT IS
ESSENTIAL TO ENABLE THE
PRACTICE OF CONTINUOUS
DELIVERY

”
DATA
• VERSION YOUR DATABASE CREATION AND MIGRATIONS (DBDEPLOY,
PHINX)

• STRIVE TO RETAIN FORWARD AND BACKWARD COMPATIBILITY

• TEST DATA IS CREATED AND MAINTAINED IN A DIFFERENT PARTITION
ESSENTIAL PRACTICES
• DON’T CHECK-IN BROKEN CODE

• RUN TEST LOCALLY BEFORE COMMITTING

• WAIT FOR TEST TO PASS BEFORE MOVING ON

• FIX BROKEN BUILDS IMMEDIATELY

• ALWAYS BE PREPARED TO REVERT TO PREVIOUS VERSION

• DON’T COMMENT OUT FAILING TESTS
PRACTICES TO CONSIDER
• FAILING A BUILD FOR ARCHITECTURAL BREACH

• FAILING A BUILD FOR SLOW TESTS

• FAILING A BUILD FOR WARNING OR CODE STYLE BREACH

• FAILING A BUILD FOR PERFORMANCE
GET TO KNOW JENKINS AND SONAR
JENKINS
• JENKINS IS AN OPEN SOURCE CONTINUOUS INTEGRATION SERVER
WRITTEN IN JAVA

• JENKINS WAS ORIGINALLY DEVELOPED AS THE HUDSON PROJECT

• JENKINS IS A FORK OF HUDSON WHEN ORACLE TRADEMARKED THE
PROJECT
JENKINS - INSTALLATION
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -!
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/
sources.list.d/jenkins.list'!
sudo apt-get update!
sudo apt-get install jenkins
JENKINS - CONFIGURE
JENKINS-PHP.ORG
JENKINS - JOBS
JENKINS - JOBS
JENKINS - BUILD & POST-BUILD
JENKINS - NODES
JENKINS - DASHBOARD
JENKINS - POST-BUILD
JENKINS - RESULTS
JENKINS - TEST COVERAGE
JENKINS - ACCEPTANCE TEST - BEHAT &
PHANTOMJS
JENKINS - PERFORMANCE TEST
JENKINS - CHUCK NORRIS
SONAR - INSTALLATION
sudo sh -c 'echo deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/ > /
etc/apt/sources.list'!
sudo apt-get update!
sudo apt-get install sonar
SONAR - CONFIGURE
SONAR - QUALITY PROFILE
SONAR - QUALITY PROFILE
SONAR - DASHBOARD
DEPLOYMENT PIPELINE

DEMO
REFERENCES

JENKINS-PHP.ORG

More Related Content

What's hot

CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
Edureka!
 
Introduction to IAC and Terraform
Introduction to IAC and Terraform Introduction to IAC and Terraform
Introduction to IAC and Terraform
Venkat NaveenKashyap Devulapally
 
Jenkins Tutorial.pdf
Jenkins Tutorial.pdfJenkins Tutorial.pdf
Jenkins Tutorial.pdf
devtestervicky
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
Amazon Web Services
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
Noa Harel
 
Terraform
TerraformTerraform
Terraform
Phil Wilkins
 
Openshift argo cd_v1_2
Openshift argo cd_v1_2Openshift argo cd_v1_2
Openshift argo cd_v1_2
RastinKenarsari
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)
Lucas Jellema
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
Ashok Kumar
 
Repository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryRepository Management with JFrog Artifactory
Repository Management with JFrog Artifactory
Stephen Chin
 
DevOps Monitoring and Alerting
DevOps Monitoring and AlertingDevOps Monitoring and Alerting
DevOps Monitoring and Alerting
Khairul Zebua
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
HarikaReddy115
 
Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architecture
Igor Khotin
 
Prometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is comingPrometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is coming
Julien Pivotto
 
Jenkins
JenkinsJenkins
Jenkins
Roger Xia
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
Viyaan Jhiingade
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
Mamun Rashid, CCDH
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
VMware Tanzu
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
Bob Killen
 

What's hot (20)

CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
 
Introduction to IAC and Terraform
Introduction to IAC and Terraform Introduction to IAC and Terraform
Introduction to IAC and Terraform
 
Jenkins Tutorial.pdf
Jenkins Tutorial.pdfJenkins Tutorial.pdf
Jenkins Tutorial.pdf
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 
Terraform
TerraformTerraform
Terraform
 
Openshift argo cd_v1_2
Openshift argo cd_v1_2Openshift argo cd_v1_2
Openshift argo cd_v1_2
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
 
Repository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryRepository Management with JFrog Artifactory
Repository Management with JFrog Artifactory
 
DevOps Monitoring and Alerting
DevOps Monitoring and AlertingDevOps Monitoring and Alerting
DevOps Monitoring and Alerting
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architecture
 
Prometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is comingPrometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is coming
 
Terraform
TerraformTerraform
Terraform
 
Jenkins
JenkinsJenkins
Jenkins
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 

Similar to Continuous integration using Jenkins and Sonar

Continuous database deployment
Continuous database deploymentContinuous database deployment
Continuous database deployment
Mike (Michael) Acord
 
Extreme programming (xp) | David Tzemach
Extreme programming (xp) | David TzemachExtreme programming (xp) | David Tzemach
Extreme programming (xp) | David Tzemach
David Tzemach
 
Reigniting the Volusion platform
Reigniting the Volusion platformReigniting the Volusion platform
Reigniting the Volusion platform
Andrew Siemer
 
Introduction to Agile scrum
Introduction to Agile scrumIntroduction to Agile scrum
Introduction to Agile scrum
Sachin Khosla
 
Actionable Continuous Delivery Metrics - QCon San Francisco November 2018
Actionable Continuous Delivery Metrics - QCon San Francisco November 2018 Actionable Continuous Delivery Metrics - QCon San Francisco November 2018
Actionable Continuous Delivery Metrics - QCon San Francisco November 2018
Suzie Prince
 
Role of Pipelines in Continuous Delivery
Role of Pipelines in Continuous DeliveryRole of Pipelines in Continuous Delivery
Role of Pipelines in Continuous Delivery
Mandi Walls
 
2018 07-24 network security at the speed of dev ops - webinar
2018 07-24 network security at the speed of dev ops - webinar2018 07-24 network security at the speed of dev ops - webinar
2018 07-24 network security at the speed of dev ops - webinar
AlgoSec
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
Aviran Mordo
 
Continuous delivery - takeaways
Continuous delivery - takeawaysContinuous delivery - takeaways
Continuous delivery - takeaways
Manuela Grindei
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
Shiva Narayanaswamy
 
Introduction to continuous delivery
Introduction to continuous deliveryIntroduction to continuous delivery
Introduction to continuous deliveryOlympicSoftware
 
Think You've Tested Your DR Plan? Think again!
Think You've Tested Your DR Plan? Think again!Think You've Tested Your DR Plan? Think again!
Think You've Tested Your DR Plan? Think again!
Hostway|HOSTING
 
From Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOpsFrom Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOps
Luca Minudel
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability Assessment
Kristine Hejna
 
Agile Transformation: People, Process and Tools to Make Your Transformation S...
Agile Transformation: People, Process and Tools to Make Your Transformation S...Agile Transformation: People, Process and Tools to Make Your Transformation S...
Agile Transformation: People, Process and Tools to Make Your Transformation S...
QASymphony
 
DevOps Overview
DevOps OverviewDevOps Overview
DevOps Overview
Omri Spector
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
Masas Dani
 
01 Pendahuluan DRPL vREVHLZ100221.pdf
01 Pendahuluan DRPL vREVHLZ100221.pdf01 Pendahuluan DRPL vREVHLZ100221.pdf
01 Pendahuluan DRPL vREVHLZ100221.pdf
AidilAfriansyah3
 
DataArt Odessa IT talk: Ansible use-cases and custom modules
DataArt Odessa IT talk: Ansible use-cases and custom modulesDataArt Odessa IT talk: Ansible use-cases and custom modules
DataArt Odessa IT talk: Ansible use-cases and custom modules
KharchenkoKaterina
 

Similar to Continuous integration using Jenkins and Sonar (20)

SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 
Continuous database deployment
Continuous database deploymentContinuous database deployment
Continuous database deployment
 
Extreme programming (xp) | David Tzemach
Extreme programming (xp) | David TzemachExtreme programming (xp) | David Tzemach
Extreme programming (xp) | David Tzemach
 
Reigniting the Volusion platform
Reigniting the Volusion platformReigniting the Volusion platform
Reigniting the Volusion platform
 
Introduction to Agile scrum
Introduction to Agile scrumIntroduction to Agile scrum
Introduction to Agile scrum
 
Actionable Continuous Delivery Metrics - QCon San Francisco November 2018
Actionable Continuous Delivery Metrics - QCon San Francisco November 2018 Actionable Continuous Delivery Metrics - QCon San Francisco November 2018
Actionable Continuous Delivery Metrics - QCon San Francisco November 2018
 
Role of Pipelines in Continuous Delivery
Role of Pipelines in Continuous DeliveryRole of Pipelines in Continuous Delivery
Role of Pipelines in Continuous Delivery
 
2018 07-24 network security at the speed of dev ops - webinar
2018 07-24 network security at the speed of dev ops - webinar2018 07-24 network security at the speed of dev ops - webinar
2018 07-24 network security at the speed of dev ops - webinar
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
Continuous delivery - takeaways
Continuous delivery - takeawaysContinuous delivery - takeaways
Continuous delivery - takeaways
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
 
Introduction to continuous delivery
Introduction to continuous deliveryIntroduction to continuous delivery
Introduction to continuous delivery
 
Think You've Tested Your DR Plan? Think again!
Think You've Tested Your DR Plan? Think again!Think You've Tested Your DR Plan? Think again!
Think You've Tested Your DR Plan? Think again!
 
From Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOpsFrom Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOps
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability Assessment
 
Agile Transformation: People, Process and Tools to Make Your Transformation S...
Agile Transformation: People, Process and Tools to Make Your Transformation S...Agile Transformation: People, Process and Tools to Make Your Transformation S...
Agile Transformation: People, Process and Tools to Make Your Transformation S...
 
DevOps Overview
DevOps OverviewDevOps Overview
DevOps Overview
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
 
01 Pendahuluan DRPL vREVHLZ100221.pdf
01 Pendahuluan DRPL vREVHLZ100221.pdf01 Pendahuluan DRPL vREVHLZ100221.pdf
01 Pendahuluan DRPL vREVHLZ100221.pdf
 
DataArt Odessa IT talk: Ansible use-cases and custom modules
DataArt Odessa IT talk: Ansible use-cases and custom modulesDataArt Odessa IT talk: Ansible use-cases and custom modules
DataArt Odessa IT talk: Ansible use-cases and custom modules
 

Recently uploaded

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
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
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
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
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Continuous integration using Jenkins and Sonar

  • 1. CONTINUOUS INTEGRATION TEST AND DEPLOYMENT AUTOMATION
  • 2. FOCUS • WHY CONTINUOUS INTEGRATION • HOW TO INTEGRATE CONTINUOUS INTEGRATION IN YOUR WORKFLOW • GET TO KNOW JENKINS AND SONAR • DEPLOYMENT PIPELINE - DEMO
  • 4. THE PROBLEM OF DELIVERING SOFTWARE IF SOMEBODY THINKS OF A GOOD IDEA, HOW DO WE DELIVER IT TO USERS AS QUICKLY AS POSSIBLE WITHOUT BREAKING EVERYTHING?
  • 5. BEHAVIOUR OF SOFTWARE PROJECT • FOR LONG PERIODS OF TIME DURING DEVELOPMENT, THE APPLICATION IS NOT IN A WORKING STATE • NOBODY IS INTERESTED IN RUNNING THE WHOLE APPLICATION UNTIL IT’S FINISHED • NOBODY TRIES TO RUN THE APPLICATION IN A PRODUCTION-LIKE ENVIRONMENT • DOUBLY TRUE OF LONG LIVED BRANCHES OR UAT TESTING THAT’S DEFERRED TO THE END
  • 6. RELEASE ANTI-PATTERNS - MANUAL DEPLOY SIGNS: EFFECTS: • DETAILED DEPLOYMENT PROCEDURE • ERRORS WILL OCCUR EVERY TIME THEY ARE PERFORMED. THE ONLY QUESTION IS WHETHER OR NOT THE ERRORS ARE SIGNIFICANT • MANUAL REGRESSION TESTING • RELEASE THAT TAKE MORE THAN A FEW MINUTES • UNPREDICTABLE RELEASE - HAS TO BE ROLLED BACK • DEPLOYMENT WINDOWS ! ! ! • NOT REPEATABLE OR RELIABLE • MANUAL DEPLOYMENTS DEPENDS ON DEPLOYMENT EXPERTS • BORING AND REPETITIVE • EXPENSIVE MANUAL TESTING • NOT AUDITABLE
  • 7. CAN WE DO BETTER? SOFTWARE RELEASES CAN AND SHOULD BE: • LOW-RISK • FREQUENT • CHEAP • RAPID • PREDICTABLE
  • 8. HOW? • AUTOMATED - IF THE BUILD, DEPLOY, TEST AND RELEASE IS NOT AUTOMATED, IT IS NOT REPEATABLE. IT WILL BE DIFFERENT EVERY TIME. RELEASING SHOULD BE AN ENGINEERING DISCIPLINE • FREQUENT - IF THE RELEASE IS FREQUENT, THE DELTA BETWEEN RELEASE WILL BE SMALL. • EASIER TO ROLL BACK • FASTER FEEDBACK
  • 9. BENEFITS • REPEATABLE, RELIABLE, PREDICTABLE RELEASE PROCESS • ERROR REDUCTION - NO HUMAN BEING OR TEAM OF HUMAN BEING CAN SPOT A BREAKING CHANGE IN MILLIONS OF LINES OF CODE - LET THE COMPUTER DO THAT • LOWERING STRESS - PEACE OF MIND THAT THE FEATURES WORK • FLEXIBLE DEPLOYMENT SCHEDULES - DEPLOY AT THE PUSH OF A BUTTON —YES EVEN ON FRIDAY @ 1:30PM
  • 10. “ THE FIRST TIME YOU DO AUTOMATION, IT WILL BE PAINFUL — BUT IT WILL BECOME EASIER AND THE BENEFITS WILL BE INCALCULABLE ”
  • 11. HOW TO INTEGRATE CI INTO YOUR WORKFLOW
  • 12. “ IN SOFTWARE, WHEN SOMETHING IS PAINFUL, THE WAY TO REDUCE THE PAIN IS TO DO IT MORE FREQUENTLY, NOT LESS ”
  • 13. PRINCIPLES OF SOFTWARE DELIVERY SOFTWARE CAN BE BROKEN DOWN INTO 4 COMPONENTS: • HOST ENVIRONMENT • CONFIGURATION • CODE • DATA KEEP EVERYTHING IN VERSION CONTROL!!!
  • 14. HOST ENVIRONMENT • CAN I REPRODUCE ANY OF MY ENVIRONMENTS (OS, SOFTWARE INSTALLED, CONFIGURATION) • CAN I MAKE AN INCREMENTAL CHANGE TO THESE ENVIRONMENTS • CAN I TRACE BACK THIS CHANGE, WHO MADE IT AND WHEN THEY MADE IT • IS IT EASY FOR EVERY MEMBER TO APPLY THESE CHANGES
  • 15. CONFIGURATION TREAT YOUR CONFIGURATION LIKE CODE • BASED ON APPLICATION AND ENVIRONMENT, IT SHOULD BE EASY TO SEE WHAT THE OPTIONS ARE • USE CLEAR NAMING CONVENTIONS • MODULAR AND ENCAPSULATED • DRY / KISS • TESTED
  • 16. “ IT SHOULD ALWAYS BE CHEAPER TO CREATE A NEW ENVIRONMENT THAN TO REPAIR AN OLD ONE ”
  • 17. CODE • MUST BE IN VERSION CONTROL • MUST HAVE A TESTING STRATEGY ( > 70% COVERAGE) • USE MEANINGFUL COMMIT MESSAGES • BRANCH BY ABSTRACTION • USE DEPENDENCY INJECTION • TDD
  • 18. “ TEST DRIVEN DEVELOPMENT IS ESSENTIAL TO ENABLE THE PRACTICE OF CONTINUOUS DELIVERY ”
  • 19. DATA • VERSION YOUR DATABASE CREATION AND MIGRATIONS (DBDEPLOY, PHINX) • STRIVE TO RETAIN FORWARD AND BACKWARD COMPATIBILITY • TEST DATA IS CREATED AND MAINTAINED IN A DIFFERENT PARTITION
  • 20. ESSENTIAL PRACTICES • DON’T CHECK-IN BROKEN CODE • RUN TEST LOCALLY BEFORE COMMITTING • WAIT FOR TEST TO PASS BEFORE MOVING ON • FIX BROKEN BUILDS IMMEDIATELY • ALWAYS BE PREPARED TO REVERT TO PREVIOUS VERSION • DON’T COMMENT OUT FAILING TESTS
  • 21. PRACTICES TO CONSIDER • FAILING A BUILD FOR ARCHITECTURAL BREACH • FAILING A BUILD FOR SLOW TESTS • FAILING A BUILD FOR WARNING OR CODE STYLE BREACH • FAILING A BUILD FOR PERFORMANCE
  • 22. GET TO KNOW JENKINS AND SONAR
  • 23. JENKINS • JENKINS IS AN OPEN SOURCE CONTINUOUS INTEGRATION SERVER WRITTEN IN JAVA • JENKINS WAS ORIGINALLY DEVELOPED AS THE HUDSON PROJECT • JENKINS IS A FORK OF HUDSON WHEN ORACLE TRADEMARKED THE PROJECT
  • 24. JENKINS - INSTALLATION wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -! sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/ sources.list.d/jenkins.list'! sudo apt-get update! sudo apt-get install jenkins
  • 28. JENKINS - BUILD & POST-BUILD
  • 33. JENKINS - TEST COVERAGE
  • 34. JENKINS - ACCEPTANCE TEST - BEHAT & PHANTOMJS
  • 36. JENKINS - CHUCK NORRIS
  • 37. SONAR - INSTALLATION sudo sh -c 'echo deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/ > / etc/apt/sources.list'! sudo apt-get update! sudo apt-get install sonar
  • 39. SONAR - QUALITY PROFILE
  • 40. SONAR - QUALITY PROFILE