SlideShare a Scribd company logo
1 of 63
Download to read offline
Continuous Integration
Continuous Integration
• What is Continuous Integration?
• Why do we need it?
• Different phases of adopting Continuous Integration
• Developers commit code to a shared
repository on a regular basis.
• Version control system is being monitored.
When a commit is detected, a build will be
triggered automatically.
• If the build is not green, developers will be
notified immediately.
What is Continuous Integration?
Why do we need Continuous Integration?
• Detect problems or bugs, as early as possible, in the
development life cycle.
• Since the entire code base is integrated, built and tested
constantly , the potential bugs and errors are caught earlier in
the life cycle which results in better quality software.
Different stages of adopting
Continuous Integration
Few commits
Stage 1:
• No build servers.
• Developers commit
on a regular basis.
• Changes are integrated and
tested manually.
• Fewer releases.
Stage 2:
Build nightly
Build and run tests
• Automated builds are
scheduled on a regular basis.
• Build script compiles the
application and runs a set of
automated tests.
• Developers now commit their
changes regularly.
• Build servers would alert the
team members in case of
build failure.
Stage 3:
Triggered
atomically
Build and run tests
• A build is triggered whenever
new code is committed to
the central repository.
• Broken builds are usually
treated as a high priority
issue and are fixed quickly.
Stage 4:
Triggered
atomically
Build, run code quality and code
coverage metrics along with tests
• Automated code quality
and code coverage metrics
are now run along with
unit tests to continuously
evaluate the code quality.
Is the code coverage increasing?
Do we have fewer and fewer
build failures?
Stage 5:
Triggered
atomically
• Automated Deployment
Production
CI/CD Environment
_______________________________________________
Continuous Integration
Continuous Delivery
Continuous Deployment
• Continuous Integration
The practice of merging development work with the main branch
constantly.
• Continuous Delivery
Continual delivery of code to an environment once the code is ready to
ship. This could be staging or production. The idea is the product is
delivered to a user base, which can be QAs or customers for review and
inspection.
• Continuous Deployment
The deployment or release of code to production as soon as it is ready.
DevOps
__________________________________________________
Deployment
How to implement Continuous Integration?
Non-hosted solutions Hosted solutions
Continuous Integration is also a mindset
• Fixing broken builds should be treated as a high priority issue for all team
members.
• The deployment process should be automated, with no manual steps involved.
• All team members should focus on contributing to high-quality tests because the
confidentiality of the CI process highly depends on the quality of the tests.
What is Jenkins
• Jenkins is a continuous integration and build server.
• It is used to manually, periodically, or automatically build software
development projects.
• It is an open source Continuous Integration tool written in Java.
• Jenkins is used by teams of all different sizes, for projects with various
languages.
Why Jenkins is popular
• Easy to use
• Great extensibility
– Support different version control systems
– Code quality metrics
– Build notifiers
– UI customization
• Jenkins’ Master and Slave Architecture
• Some Important Jenkins’ Terminologies
Jenkins’ Master and Slave Architecture
Master:
• Schedule build jobs.
• Dispatch builds to the slaves for the
actual job execution.
• Monitor the slaves and record the
build results.
• Can also execute build jobs directly.
Slave:
• Execute build jobs dispatched by
the master.
Jenkins UI Overview
Install GIT and GitHub plugin
Install and Configure Maven
What does Maven do?
• Maven describes how the software is built.
• Maven describes the project’s dependencies.
Java Build Tools
Configure Jenkins for a Maven -based project
Create a Maven -based Jenkins project
Run Maven-based Jenkins project
Maven pom.xml file
• Describe the software project being built, including
– The dependencies on other external modules.
– The directory structures.
– The required plugins.
– The predefined targets for performing certain tasks such as
compilation and packaging.
Different Phases in Maven Build Lifecycle
validate Validate the project is correct and all necessary information is available.
compile Compile the source code of the project.
test Test the compiled source code using a suitable unit testing framework.
package Take the compiled code and package it in its distributable format.
verify Run any checks on results of integration tests to ensure quality criteria are met.
install Install the package into the local repository, for use as a dependency in other
projects locally.
deploy Copy the final package to the remote repository for sharing with other
developers and projects.
Maven Build Phases
• These lifecycle phases are executed sequentially to complete the default
lifecycle.
• We want to specify the maven package command, this command would
execute each default life cycle phase in order including validate, compile,
test before executing package.
• We only need to call the last build phase to be executed.
Jenkins code quality metrics report
Checkstyle is a code static analysis tool to help programmers to write
Java code that adheres to a coding standard such as
• Avoiding multiple blank lines;
• Removing unused variables;
• Enforcing correct indentations;
• …
Jenkins’ support for other build systems
(Ant, Gradle and shell scripts)
Apache Ant
• Widely-used and very well-known build scripting language for Java.
• Flexible, extensible, relatively low-level scripting language.
• An Ant build script is made up of a number of targets, each target
performs a particular job in the build process.
Gradle
• Gradle is a relatively new open source build tool for the Java Virtual Machine.
• Build scripts for Gradle are written in a Domain Specific Language based on
Groovy.
• The concise nature of Groovy scripting lets you write very expressive build scripts
with very little code.
Build Scripts
Maven Build Script
Gradle Build Script
Ant Build Script Sample
Install and configure Tomcat as a staging
environment
Tomcat
Tomcat is an open-source web server and provides a "pure Java” HTTP
web server environment in which Java code can run.
• Install copy artifact and deploy to container plugins
• Deploy our application to staging environment
Jenkins Build Pipeline
Build Pipeline Plugin
Parallel Jenkins Build
Continuous Delivery
Deploy our app to production
Benefits of a code-based pipeline
• Version control
• Best Practices
• Less error-prone execution of jobs
• Logic-based execution of steps
Sample Jenkinsfile
Additional automation
• Setup Git repository polling
• Deployment to our tomcat servers
• We will setup tasks to run in parallel
Steps
• Step 1: Configure securit groups for Tomcat servers and create key pairs.
• Step 2: Provision instances to staging and production
environments.
• Step 3: Install and run Tomcat on created instances.
• Step 4: Fully automate our existing Jenkins pipeline.
Introduction to Distributed Jenkins Builds
Install Jenkins Master in the Cloud
Jenkins Slave Agent
Install Jenkins slaves in the cloud and form a
Jenkins cluster
Concurrent Builds on Jenkins Cluster
Label Jenkins Nodes
Build Orchestration: Jenkins
_____________________________
• Continuous integration system
• Enable automated build and test process
• Can monitoring executions of externally‐run jobs, such as cron
jobs and procmail jobs…
• Dependency tracking, allowing file finger printing and tracking
for example which build is using which version of jars…
• Generates list of changes made to build from Subversion
• Distributed build/test
• Jenkins is a build orchestration, CI software
• building/testing software projects continuously
• monitoring executions of externally‐run jobs
• FishEye allows you to extract information from your source
code repository and display it in sophisticated reports.
• Crucible allows you to request, perform and manage code
reviews.
• Subversion centralized version control system
• Sonar is a quality management platform for analyzing and
measuring source code quality.
CI/CD Pipeline: Functional Architecture
_______________________________________________
Version Control
Version
Control
System
Code
Repository
Artifact
Repository
(Artifactory)
Build
Management
(Maven)
Build
Automation
(Jenkins)
Test
Automation
QA
(SonarCube)
Release
Orchestration
Deployment
Automation
Develop
Pre-commit
Tests
1
2
Commit code to
Version Control
System
3 CI polls VCS
and creates Build
5
Automated Test
Staging
UAT SAT
Security Scan
Perf. & Load Testing
7
4
6
Release
8
Fail
Fail
Fail
Not approved
9
An Automated, Integrated and End to Ent CCRM
_______________________________________________
Git, GitLab, GitHub Enteprise,
SVN…
Maven, Ant, Gradle
Nexsus, Artifactory
Jenkins…
Junit, Test NG, Cucumber, Selenium, JMeter, SoapUI, LoadRunner…
Release
Management
Source Code
Management
(Version Control)
Build
Automation
CCRM
Test
Automation
Environment
Configuration
Management
CI/CD
Jenkins_1679702972.pdf

More Related Content

What's hot (20)

Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
GitLab for CI/CD process
GitLab for CI/CD processGitLab for CI/CD process
GitLab for CI/CD process
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
CI CD Basics
CI CD BasicsCI CD Basics
CI CD Basics
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
Flusso Continuous Integration & Continuous Delivery
Flusso Continuous Integration & Continuous DeliveryFlusso Continuous Integration & Continuous Delivery
Flusso Continuous Integration & Continuous Delivery
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
 
Basic Jenkins Guide.pptx
Basic Jenkins Guide.pptxBasic Jenkins Guide.pptx
Basic Jenkins Guide.pptx
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Formation autour de git et git lab
Formation autour de git et git labFormation autour de git et git lab
Formation autour de git et git lab
 
Welcome to Azure Devops
Welcome to Azure DevopsWelcome to Azure Devops
Welcome to Azure Devops
 

Similar to Jenkins_1679702972.pdf

Hudson
HudsonHudson
Hudson8x8
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitisSteve Povilaitis
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Continuous Integration as a Way of Life
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of LifeMelissa Benua
 
Jenkins Meetup Pune
Jenkins Meetup PuneJenkins Meetup Pune
Jenkins Meetup PuneUmesh Kumhar
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkinsecubemarketing
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developerAbe Diaz
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonVladLica
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOpsEklove Mohan
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applicationsSunil Dalal
 
Continous Integration.pptx
Continous Integration.pptxContinous Integration.pptx
Continous Integration.pptxAnuj Sharma
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 
varun JENKINS.pptx
varun JENKINS.pptxvarun JENKINS.pptx
varun JENKINS.pptxVgPolampalli
 
Learn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One GuideLearn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One GuideSam Dias
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationhugo lu
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcityMd Jawed
 

Similar to Jenkins_1679702972.pdf (20)

Jenkins.pdf
Jenkins.pdfJenkins.pdf
Jenkins.pdf
 
Hudson
HudsonHudson
Hudson
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
 
Contineous integration
Contineous integrationContineous integration
Contineous integration
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Continuous Integration as a Way of Life
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of Life
 
Jenkins Meetup Pune
Jenkins Meetup PuneJenkins Meetup Pune
Jenkins Meetup Pune
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkins
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developer
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
Continous Integration.pptx
Continous Integration.pptxContinous Integration.pptx
Continous Integration.pptx
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
varun JENKINS.pptx
varun JENKINS.pptxvarun JENKINS.pptx
varun JENKINS.pptx
 
Learn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One GuideLearn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One Guide
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 

Recently uploaded

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 

Recently uploaded (20)

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 

Jenkins_1679702972.pdf

  • 2. Continuous Integration • What is Continuous Integration? • Why do we need it? • Different phases of adopting Continuous Integration
  • 3. • Developers commit code to a shared repository on a regular basis. • Version control system is being monitored. When a commit is detected, a build will be triggered automatically. • If the build is not green, developers will be notified immediately. What is Continuous Integration?
  • 4. Why do we need Continuous Integration? • Detect problems or bugs, as early as possible, in the development life cycle. • Since the entire code base is integrated, built and tested constantly , the potential bugs and errors are caught earlier in the life cycle which results in better quality software.
  • 5. Different stages of adopting Continuous Integration
  • 6. Few commits Stage 1: • No build servers. • Developers commit on a regular basis. • Changes are integrated and tested manually. • Fewer releases.
  • 7. Stage 2: Build nightly Build and run tests • Automated builds are scheduled on a regular basis. • Build script compiles the application and runs a set of automated tests. • Developers now commit their changes regularly. • Build servers would alert the team members in case of build failure.
  • 8. Stage 3: Triggered atomically Build and run tests • A build is triggered whenever new code is committed to the central repository. • Broken builds are usually treated as a high priority issue and are fixed quickly.
  • 9. Stage 4: Triggered atomically Build, run code quality and code coverage metrics along with tests • Automated code quality and code coverage metrics are now run along with unit tests to continuously evaluate the code quality. Is the code coverage increasing? Do we have fewer and fewer build failures?
  • 12.
  • 14. • Continuous Integration The practice of merging development work with the main branch constantly. • Continuous Delivery Continual delivery of code to an environment once the code is ready to ship. This could be staging or production. The idea is the product is delivered to a user base, which can be QAs or customers for review and inspection. • Continuous Deployment The deployment or release of code to production as soon as it is ready.
  • 16. How to implement Continuous Integration? Non-hosted solutions Hosted solutions
  • 17. Continuous Integration is also a mindset • Fixing broken builds should be treated as a high priority issue for all team members. • The deployment process should be automated, with no manual steps involved. • All team members should focus on contributing to high-quality tests because the confidentiality of the CI process highly depends on the quality of the tests.
  • 18. What is Jenkins • Jenkins is a continuous integration and build server. • It is used to manually, periodically, or automatically build software development projects. • It is an open source Continuous Integration tool written in Java. • Jenkins is used by teams of all different sizes, for projects with various languages.
  • 19. Why Jenkins is popular • Easy to use • Great extensibility – Support different version control systems – Code quality metrics – Build notifiers – UI customization
  • 20.
  • 21.
  • 22. • Jenkins’ Master and Slave Architecture • Some Important Jenkins’ Terminologies
  • 23. Jenkins’ Master and Slave Architecture Master: • Schedule build jobs. • Dispatch builds to the slaves for the actual job execution. • Monitor the slaves and record the build results. • Can also execute build jobs directly. Slave: • Execute build jobs dispatched by the master.
  • 25. Install GIT and GitHub plugin
  • 27. What does Maven do? • Maven describes how the software is built. • Maven describes the project’s dependencies.
  • 29. Configure Jenkins for a Maven -based project
  • 30. Create a Maven -based Jenkins project
  • 32. Maven pom.xml file • Describe the software project being built, including – The dependencies on other external modules. – The directory structures. – The required plugins. – The predefined targets for performing certain tasks such as compilation and packaging.
  • 33. Different Phases in Maven Build Lifecycle validate Validate the project is correct and all necessary information is available. compile Compile the source code of the project. test Test the compiled source code using a suitable unit testing framework. package Take the compiled code and package it in its distributable format. verify Run any checks on results of integration tests to ensure quality criteria are met. install Install the package into the local repository, for use as a dependency in other projects locally. deploy Copy the final package to the remote repository for sharing with other developers and projects.
  • 34. Maven Build Phases • These lifecycle phases are executed sequentially to complete the default lifecycle. • We want to specify the maven package command, this command would execute each default life cycle phase in order including validate, compile, test before executing package. • We only need to call the last build phase to be executed.
  • 35. Jenkins code quality metrics report
  • 36. Checkstyle is a code static analysis tool to help programmers to write Java code that adheres to a coding standard such as • Avoiding multiple blank lines; • Removing unused variables; • Enforcing correct indentations; • …
  • 37.
  • 38.
  • 39. Jenkins’ support for other build systems (Ant, Gradle and shell scripts)
  • 40. Apache Ant • Widely-used and very well-known build scripting language for Java. • Flexible, extensible, relatively low-level scripting language. • An Ant build script is made up of a number of targets, each target performs a particular job in the build process.
  • 41. Gradle • Gradle is a relatively new open source build tool for the Java Virtual Machine. • Build scripts for Gradle are written in a Domain Specific Language based on Groovy. • The concise nature of Groovy scripting lets you write very expressive build scripts with very little code.
  • 43. Gradle Build Script Ant Build Script Sample
  • 44. Install and configure Tomcat as a staging environment
  • 45. Tomcat Tomcat is an open-source web server and provides a "pure Java” HTTP web server environment in which Java code can run.
  • 46. • Install copy artifact and deploy to container plugins • Deploy our application to staging environment
  • 50. Continuous Delivery Deploy our app to production
  • 51. Benefits of a code-based pipeline • Version control • Best Practices • Less error-prone execution of jobs • Logic-based execution of steps
  • 53. Additional automation • Setup Git repository polling • Deployment to our tomcat servers • We will setup tasks to run in parallel
  • 54. Steps • Step 1: Configure securit groups for Tomcat servers and create key pairs. • Step 2: Provision instances to staging and production environments. • Step 3: Install and run Tomcat on created instances. • Step 4: Fully automate our existing Jenkins pipeline.
  • 55. Introduction to Distributed Jenkins Builds
  • 56. Install Jenkins Master in the Cloud
  • 58. Install Jenkins slaves in the cloud and form a Jenkins cluster
  • 59. Concurrent Builds on Jenkins Cluster Label Jenkins Nodes
  • 60. Build Orchestration: Jenkins _____________________________ • Continuous integration system • Enable automated build and test process • Can monitoring executions of externally‐run jobs, such as cron jobs and procmail jobs… • Dependency tracking, allowing file finger printing and tracking for example which build is using which version of jars… • Generates list of changes made to build from Subversion • Distributed build/test • Jenkins is a build orchestration, CI software • building/testing software projects continuously • monitoring executions of externally‐run jobs • FishEye allows you to extract information from your source code repository and display it in sophisticated reports. • Crucible allows you to request, perform and manage code reviews. • Subversion centralized version control system • Sonar is a quality management platform for analyzing and measuring source code quality.
  • 61. CI/CD Pipeline: Functional Architecture _______________________________________________ Version Control Version Control System Code Repository Artifact Repository (Artifactory) Build Management (Maven) Build Automation (Jenkins) Test Automation QA (SonarCube) Release Orchestration Deployment Automation Develop Pre-commit Tests 1 2 Commit code to Version Control System 3 CI polls VCS and creates Build 5 Automated Test Staging UAT SAT Security Scan Perf. & Load Testing 7 4 6 Release 8 Fail Fail Fail Not approved 9
  • 62. An Automated, Integrated and End to Ent CCRM _______________________________________________ Git, GitLab, GitHub Enteprise, SVN… Maven, Ant, Gradle Nexsus, Artifactory Jenkins… Junit, Test NG, Cucumber, Selenium, JMeter, SoapUI, LoadRunner… Release Management Source Code Management (Version Control) Build Automation CCRM Test Automation Environment Configuration Management CI/CD