SlideShare a Scribd company logo
1 of 43
Download to read offline
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

What's hot (20)

Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Jenkins
JenkinsJenkins
Jenkins
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Leveraging Nexus Repository Manager at the Heart of DevOps
Leveraging Nexus Repository Manager at the Heart of DevOpsLeveraging Nexus Repository Manager at the Heart of DevOps
Leveraging Nexus Repository Manager at the Heart of DevOps
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Jenkins.pdf
Jenkins.pdfJenkins.pdf
Jenkins.pdf
 
Azure Pipelines
Azure PipelinesAzure Pipelines
Azure Pipelines
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
 
Sonarqube
SonarqubeSonarqube
Sonarqube
 
Devops | CICD Pipeline
Devops | CICD PipelineDevops | CICD Pipeline
Devops | CICD Pipeline
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 

Similar to Continuous integration using Jenkins and Sonar

Extreme programming (xp) | David Tzemach
Extreme programming (xp) | David TzemachExtreme programming (xp) | David Tzemach
Extreme programming (xp) | David TzemachDavid Tzemach
 
Reigniting the Volusion platform
Reigniting the Volusion platformReigniting the Volusion platform
Reigniting the Volusion platformAndrew Siemer
 
Introduction to Agile scrum
Introduction to Agile scrumIntroduction to Agile scrum
Introduction to Agile scrumSachin 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 DeliveryMandi 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 - webinarAlgoSec
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comAviran Mordo
 
Continuous delivery - takeaways
Continuous delivery - takeawaysContinuous delivery - takeaways
Continuous delivery - takeawaysManuela 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 PracticesShiva 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 DevOpsLuca Minudel
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentKristine 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
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous deliveryMasas Dani
 
01 Pendahuluan DRPL vREVHLZ100221.pdf
01 Pendahuluan DRPL vREVHLZ100221.pdf01 Pendahuluan DRPL vREVHLZ100221.pdf
01 Pendahuluan DRPL vREVHLZ100221.pdfAidilAfriansyah3
 
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 modulesKharchenkoKaterina
 

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

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

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