SlideShare a Scribd company logo
Beginners Guide
What is Continuous Integration?
Continuous Integration
• As defined by Martin Fowler
• In software engineering CI implements continuous process of applying quality control – small
pieces of effort applied frequently.
• It aims to improve the quality of software and to reduce time taken to deliver.
• This is done by replacing the traditional practice of applying quality control after completing
development with continuous integration.
What is CI?
• What it is
A development Methodology.
A daily developer integration.
Automated builds.
Continuous Integration Basics
CI Tools
Jenkins
• Written in java
• Runs inside servlet container.
• Primarily written and developed by kosuke kawaguchi.
• Split from Hudson.
• Easy to install.
• Over 600+ Plugins.
• Can be scripted.
Who uses Jenkins
Install Jenkins
• Can be installed as
1. WAR
2. Native package.
https://jenkins.io/download/
First Jenkins Job
• Start a Freestyle Job
• Just build to execute one shell script.
• Job will be named Hello World.
• In the build section choose “Execute windows batch command”. From
Add build steps.
• Click Apply.
• In command area type “echo hello world”.
• Click save.
• To run the build click Build Now.
• The console output shows a temporary batch file created by Jenkins
and execute by your behalf.
Plugins
Jenkins plugins
Default Plugin Description
ANT Use to run talk from build.xml
Credentials To store Credentials in Jenkins
JavaDoc Publishes Javadoc
Junit Publishes junit test results
Mailer Supports Mail Sending
Subversion Supports SVN
Maven Integration Integration Jenkins with maven.
LDAP LDAP Authentication support
Jenkins Plugin Interface
Plugin Tabs
Updates – Shows updates to already installed plugins.
Available – Shows plugins that are available for installation.
Installed – Shows plugins installed that have no problem.
Advanced – Allows manual upload of plugins
Pinning of Plugins
• Plugins that are bundled or preinstalled with Jenkins can be pinned.
• When Jenkins are updated all the plugins preinstalled are also
updated.
• But if any bundled plugin is manually updated it gets pinned to
current version of Jenkins.
• Update of Jenkins will not update this plugin.
• /Plugins/plugin_name.jpi.pinned is created.
• You can Unpin which means you are allowing the updates to happen.
Global Tools
• Manage Jenkins -> Global Tool Configuration
• Configure tools, their locations and automatic installers.
Automatic Install
• Install automatically allows you to have custom installers or scripts.
• Default is “Install from Apache” .
• Else you can extract an already downloaded file.
Maven Plugin
• In addition to other env variable maven plugin makes below variables available to your jobs or
scripts.
• This plugin exposes variables found from the project's POM (as of version 2.1):
• POM_DISPLAYNAME
• POM_VERSION
• POM_GROUPID
• POM_ARTIFACTID
• POM_PACKAGING
Javadoc Plugin
• Publishes your Javadoc if created by your build.
• Maven Projects
• Goal to run Javadoc:Javadoc
• Freestyle Projects
• Under “Add post-build action” -> Publish Javadoc
HTML Publisher
• Use to generate HTML files during the build.
• You can publish PMD Reports, Java Docs etc.
Git HUB
• It allows you to connect Git Hub with Jenkins.
• Trigger a build whenever push to repository happens.
Git Hub Tokens
• Goto Git Hub , log in, go to settings, personal access tokens , click on
Generate new token.
• Check repo:status
• Click on Generate Token and copy it.
• In Jenkins Management - > Configure System, Add a new GITHUB
server config.
• API URL: https://api.github.com
• Check Manage Hooks Check box.
• Click Add Button next to Credentials.
• Enter Credentials in the dialog box( Screen 2)
Configure GitHub – Screen 1
.
Jenkins Credentials Provider – Screen 2
Automatic Build when code is pushed
• You will then have to tick the box indicated below – “Build when a change is pushed to GitHub”
Contd.
• Manage Jenkins -> Manage Plugins -> Available -> GitHub plugin
• Copy the url in « Override Hook URL. And uncheck specify another hook url for GitHub Configurations.
Contd.
• The GitHub steps are pretty straight forward. Open the “Webhooks
& Services” tab -> choose “Configure Services” -> find the Jenkins
(GitHub plugin option) and fill it in with a similar URL to the
following:
• http://<Name of Jenkins server>:8080/github-webhook/
Add WebHooks in Git Hub
• The GitHub steps are pretty straight forward. Open the “Webhooks & Services” tab -> choose “Configure
Services” -> find the Jenkins (GitHub plugin option) and fill it in with a similar URL to the following:
• http://<Name of Jenkins server>:8080/github-webhook/
Parameterised Builds
• Allows user to provide parameters for Build in a URL.
• Users are prompted to enter parameters before triggering build.
• Exposes $Jenkins/job/$job/parambuild URL to trigger build with
parameter.
Credential Plugin
• Provides convenient way to organize credentials across domains and
maintains password secret once.
• Used by other plugins indirectly when you are required to provide
credentials.
• There are multiple credentials plugin including.
• Plain credentials
• SSH Credentials
• Google Oath
• Dockers Common
Credential Plugin
• Kinds of Credentials
• Username with password
• SSH Username with private key
• Certificate.
• Scope of Credentials
• Global- Available to the object on which credentials is associated and all
objects that are children on that object.
• System – Only available to object on which credentials is associated.
Eg email
Jenkins Copy Artifact
• Allows you to copy artifacts built from other jobs into current workspace.
• Select the option from Build Steps.
Jenkins Copy Artifact (Contd)
• Files matched by the "Artifacts to copy" field are copied to the same directory structure as the
source build had You can use the "Flatten directories" option if you want the file(s) to be copied
to the root of the build workspace.
• Projects must enable “permission to copy Artifact” and select the project which is authorized to
copy artifacts.
• The location from which the artifacts are copied from is relative to:
• - the artifacts folder,
• - for the selected build,
• - for the job you selected to copy from
• So, first things first, you have to make sure that the job that you are copying from is actually
archiving the artifacts. It will not copy files from workspace (there are other plugins for that).
• To archive your artifacts, in the job the creates them, select post-build action "Archive the
artifacts", then provide a list of artifacts you want to archive, relative to workspace. For example,
to archive all zip files, regardless of where they are, use:
**/*.zip
• Or if you know that all your artifacts are inside the "build" folder, but there may be intermediate
directories in between, use:
build/**/*.zip
• Or simply provide a full path:
build/myartifactsfolder/myfile.zip
Jenkins Copy Artifact (Contd)
Jenkins Copy Artifact (Contd)
• Now, to view the artifacts available, navigate in your browser to the URL of the job from which
you want to copy, select the build you wish to copy from, and then append /artifact/ at the end,
or just click "Build Artifacts" link on the page:
example: http://localhost/job/YourJob/lastBuild/artifact/
• This will show a directory structure and all available artifacts. You can reference this in the "Copy
Artifacts" post-build step directly. Or you can use wildcards. For example, if you want to ignore
any directory structure, and just copy all *.zip files, your "Artifacts to copy" field should be:
**/*.zip
• The double stars ignore directories in between. You can use comma to separate multiple entries.
Alternatively, if you leave this field blank, it will copy all available artifacts.
• On the receiving end, the "Target directory" is relative to the Workspace of the job that is calling
the "Copy Artifacts" step.
• Lastly, if you don't care about the directory structure, check mark the "Flatten directories" option,
so that all artifacts end up in the same place, ignoring any folders in between.
Triggers
• Manual Build
• Click manually build now.
• On Schedule
• Use UNIX Cron rotation
• Minutes
• Hours
• Day of month
• Month
• Day of week
• When code changes in SCM
• Polling SCM
• Triggered on other builds.
Triggers (Contd)
Cron Format
• Jenkins uses UNIX Cron notation
• Minutes (0-59)
• * represents every value ***** means once every minute.
• / allows you to skip e.g. */5 means every 5 minute.
• Hours (0-23)
• Commas represents list of values e.g. 2,3 means at 2 and 3 am in morning.
• Day of month (1-31)
• Month (1-12)
• Day of week (0-7)
• Ranges are allowed 1-5 means between Monday to Friday.
1. By setting the schedule period to 15 13 * * * you tell jenkins to schedule the build every day of every month of every year at the 15th
minute of the 13th hour of the day.
2. If you want to schedule your build every 5 minutes, this will do the job : */5 * * * *
3. If you want to schedule your build every day at 8h00, this will do the job : 0 8 * * *
Cron (Contd)
• Jenkins lets you set up multiple times, separated by line breaks.
• If you need it to build daily at 7am, along with every Sunday at 4pm, the below works well
• H 7 * * *
• H 16 * * 0
Types of JOB
• Maven
• Free Style
• Monitor an External Job
• Multi Configurations jobs
Screen 1
Maven vs FreeStyle
• A maven project is a project that will analyze the pom.xml file in greater detail and
produce a project that's geared towards the targets that are invoked. The maven project
is smart enough to incorporate build targets like the javadoc or test targets and
automatically setup the reports for those targets. There is little configuration required for
it. See: http://wiki.hudson-ci.org/display/HUDSON/Building+a+maven2+project for more
information on Maven project.
• A Free-Style project is a project that can incorporate almost any type of build. While a
maven project you can only build maven projects, the Free-Style project is the more
"generic" form of a project. You can execute shell/dos scripts, invoke ant, and a lot more.
Majority of the plugins are written to use the free-style project. The maven module is
limited in that it can't invoke a shell script, or anything else just the maven targets. See:
http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project for more
information on a Free-Style project.
Multi Configuration
Multi Configuration (Contd.)
Email
Email
Email
Navigate to https://myaccount.google.com/lesssecureapps?pli=1
• Please enter your Gmail id when prompted while accessing the above url
• Now turn on Allow less secure apps (This will enable your Gmail SMTP to interact with jenkins)
Email / IRC integration
Follow the steps as illustrated in previous slides
Go to localhost:8080 (default port for Jenkins)
Navigate to Manage Jenkins  Configure System
Tick , Use SMTP Authentication
Follow the details as per screenshot
Give the username and password
Tick, Use SSL
Enter SMTP port
Reply to address
Charset
Please enter a recipient email address
Test by clicking on Test configuration
Email Functionality
• Default Email notification in Jenkins Post Build Action.
• Email address can be separated by commas.
Email (Contd)
• Use Email Template management plugin if you don’t want use default
one.
Authorization – Create User
User Access – Assign Roles to User
Parameterization
• Jenkins allows parameters to be set for builds.
• While configuring job check the below option.
Parameterization (Contd)
• Simple Types
• Boolean
• Choice(Dropdown)
• String
• Text(Same as string but allow new lines)
• Password(masked string)
• Complex Types
• File Parameters(Allows file to be uploaded)
• Run parameters – Access past builds
• Build Selector for copy artifact.
Parameterization (Contd)
• A parameterized job can be accessed by posting to
• https://<yourserver>/job/$job/buildwithParameteres?PARAMETER=v
alue
Junit Test Report
• Just make sure you build the maven with test profile.
Health report amplification factor
• The amplification factor to apply to test failures when computing the test result contribution to
the build health score.
• The default factor is 1.0
• A factor of 0.0 will disable the test result contribution to build health score.
• A factor of 0.1 means that 10% of tests failing will score 99% health
• A factor of 0.5 means that 10% of tests failing will score 95% health
• A factor of 1.0 means that 10% of tests failing will score 90% health
• A factor of 2.0 means that 10% of tests failing will score 80% health
• A factor of 2.5 means that 10% of tests failing will score 75% health
• A factor of 5.0 means that 10% of tests failing will score 50% health
• A factor of 10.0 means that 10% of tests failing will score 0% health
Contd
Junit Test Report – Displaying test results
Junit report (Contd)
Publish HTML Reports
Sample Report for PMD Plugin (Code
Coverage tool)
Code Coverage Tool
Maven and Code Coverage Tool Goals
• For PMD:- pmd:pmd
• For Corbertura:- cobertura:cobertura
• For Find bugs :- findbugs:findbugs
Cobertura Plugin – Post Build Actions
Sample Cobertura Report
Configure Pom.xml
• To know how to configure pom.xml to set up code coverage tools.
• Refer pom.xml of this project:
https://github.com/Viyaan/JenkinsJobFlow
HTML Validation
• Install Unicorn Validator
• In Build step select unicorn validator.
• Enter the URL of site to validate.
HTML Validation Report
Backup and Restore
• Install back up plugin.
Set up for Backup Manager Plugin
Backup Manager plugin parameters
• Backup directory: A shared folder where back up is dumped.
• Format: At what format it is dumped.
• Verbose: Backup will be logged.
• If you want to schedule your back periodically use thinBackup plugin.

More Related Content

What's hot

Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
Mamun Rashid, CCDH
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Continuous Delivery with Jenkins
Continuous Delivery with JenkinsContinuous Delivery with Jenkins
Continuous Delivery with Jenkins
Jadson Santos
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
Ajeet Singh Raina
 
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!
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
Suresh Kumar
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Simplilearn
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Hawkman Academy
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
Steffen Gebert
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
Knoldus Inc.
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
Gena Mykhailiuta
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
Kumar Shìvam
 
CI/CD
CI/CDCI/CD
CI/CD
AmitDhodi
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
Hoang Le
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
David Hahn
 

What's hot (20)

Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Jenkins
JenkinsJenkins
Jenkins
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Continuous Delivery with Jenkins
Continuous Delivery with JenkinsContinuous Delivery with Jenkins
Continuous Delivery with Jenkins
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
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...
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
CI/CD
CI/CDCI/CD
CI/CD
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 

Similar to Jenkins CI

Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
Pei-Hsuan Hsieh
 
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
Abe Diaz
 
IBM Bluemix - Building a Project with Maven
IBM Bluemix - Building a Project with MavenIBM Bluemix - Building a Project with Maven
IBM Bluemix - Building a Project with Maven
Craig Trim
 
Jenkins.pptx
Jenkins.pptxJenkins.pptx
Jenkins.pptx
rfojdar
 
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
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
Ulrich Krause
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Kalkey
 
Louisville Software Engineering Meet Up: Continuous Integration Using Jenkins
Louisville Software Engineering Meet Up: Continuous Integration Using JenkinsLouisville Software Engineering Meet Up: Continuous Integration Using Jenkins
Louisville Software Engineering Meet Up: Continuous Integration Using Jenkins
James Strong
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
MahmoudAlnmr1
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
shahidafrith
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
Devops
DevopsDevops
Devops
JyothirmaiG4
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOCCarl Lu
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
Fabio Fumarola
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
Mangesh Bhujbal
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jira
lenamattt
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Max Romanovsky
 

Similar to Jenkins CI (20)

Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
 
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
 
IBM Bluemix - Building a Project with Maven
IBM Bluemix - Building a Project with MavenIBM Bluemix - Building a Project with Maven
IBM Bluemix - Building a Project with Maven
 
Jenkins.pptx
Jenkins.pptxJenkins.pptx
Jenkins.pptx
 
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
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Contineous integration
Contineous integrationContineous integration
Contineous integration
 
Louisville Software Engineering Meet Up: Continuous Integration Using Jenkins
Louisville Software Engineering Meet Up: Continuous Integration Using JenkinsLouisville Software Engineering Meet Up: Continuous Integration Using Jenkins
Louisville Software Engineering Meet Up: Continuous Integration Using Jenkins
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Devops
DevopsDevops
Devops
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOC
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jira
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
 

More from Viyaan Jhiingade

Rate limiting
Rate limitingRate limiting
Rate limiting
Viyaan Jhiingade
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
Viyaan Jhiingade
 
No sql
No sqlNo sql
Rest Webservice
Rest WebserviceRest Webservice
Rest Webservice
Viyaan Jhiingade
 
Storm
StormStorm
Git commands
Git commandsGit commands
Git commands
Viyaan Jhiingade
 
Kafka RealTime Streaming
Kafka RealTime StreamingKafka RealTime Streaming
Kafka RealTime Streaming
Viyaan Jhiingade
 

More from Viyaan Jhiingade (7)

Rate limiting
Rate limitingRate limiting
Rate limiting
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
No sql
No sqlNo sql
No sql
 
Rest Webservice
Rest WebserviceRest Webservice
Rest Webservice
 
Storm
StormStorm
Storm
 
Git commands
Git commandsGit commands
Git commands
 
Kafka RealTime Streaming
Kafka RealTime StreamingKafka RealTime Streaming
Kafka RealTime Streaming
 

Recently uploaded

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
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
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
 
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
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
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
 
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
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
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
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 

Recently uploaded (20)

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
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
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...
 
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*
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
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
 
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
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
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...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 

Jenkins CI

  • 2. What is Continuous Integration?
  • 3. Continuous Integration • As defined by Martin Fowler • In software engineering CI implements continuous process of applying quality control – small pieces of effort applied frequently. • It aims to improve the quality of software and to reduce time taken to deliver. • This is done by replacing the traditional practice of applying quality control after completing development with continuous integration.
  • 4. What is CI? • What it is A development Methodology. A daily developer integration. Automated builds.
  • 5.
  • 8. Jenkins • Written in java • Runs inside servlet container. • Primarily written and developed by kosuke kawaguchi. • Split from Hudson. • Easy to install. • Over 600+ Plugins. • Can be scripted.
  • 10. Install Jenkins • Can be installed as 1. WAR 2. Native package. https://jenkins.io/download/
  • 11. First Jenkins Job • Start a Freestyle Job • Just build to execute one shell script. • Job will be named Hello World.
  • 12. • In the build section choose “Execute windows batch command”. From Add build steps. • Click Apply.
  • 13. • In command area type “echo hello world”. • Click save. • To run the build click Build Now.
  • 14. • The console output shows a temporary batch file created by Jenkins and execute by your behalf.
  • 16. Jenkins plugins Default Plugin Description ANT Use to run talk from build.xml Credentials To store Credentials in Jenkins JavaDoc Publishes Javadoc Junit Publishes junit test results Mailer Supports Mail Sending Subversion Supports SVN Maven Integration Integration Jenkins with maven. LDAP LDAP Authentication support
  • 18. Plugin Tabs Updates – Shows updates to already installed plugins. Available – Shows plugins that are available for installation. Installed – Shows plugins installed that have no problem. Advanced – Allows manual upload of plugins
  • 19. Pinning of Plugins • Plugins that are bundled or preinstalled with Jenkins can be pinned. • When Jenkins are updated all the plugins preinstalled are also updated. • But if any bundled plugin is manually updated it gets pinned to current version of Jenkins. • Update of Jenkins will not update this plugin. • /Plugins/plugin_name.jpi.pinned is created. • You can Unpin which means you are allowing the updates to happen.
  • 20. Global Tools • Manage Jenkins -> Global Tool Configuration • Configure tools, their locations and automatic installers.
  • 21. Automatic Install • Install automatically allows you to have custom installers or scripts. • Default is “Install from Apache” . • Else you can extract an already downloaded file.
  • 22. Maven Plugin • In addition to other env variable maven plugin makes below variables available to your jobs or scripts. • This plugin exposes variables found from the project's POM (as of version 2.1): • POM_DISPLAYNAME • POM_VERSION • POM_GROUPID • POM_ARTIFACTID • POM_PACKAGING
  • 23. Javadoc Plugin • Publishes your Javadoc if created by your build. • Maven Projects • Goal to run Javadoc:Javadoc • Freestyle Projects • Under “Add post-build action” -> Publish Javadoc
  • 24. HTML Publisher • Use to generate HTML files during the build. • You can publish PMD Reports, Java Docs etc.
  • 25. Git HUB • It allows you to connect Git Hub with Jenkins. • Trigger a build whenever push to repository happens.
  • 26. Git Hub Tokens • Goto Git Hub , log in, go to settings, personal access tokens , click on Generate new token. • Check repo:status • Click on Generate Token and copy it. • In Jenkins Management - > Configure System, Add a new GITHUB server config. • API URL: https://api.github.com • Check Manage Hooks Check box. • Click Add Button next to Credentials. • Enter Credentials in the dialog box( Screen 2)
  • 27. Configure GitHub – Screen 1 .
  • 29. Automatic Build when code is pushed • You will then have to tick the box indicated below – “Build when a change is pushed to GitHub”
  • 30. Contd. • Manage Jenkins -> Manage Plugins -> Available -> GitHub plugin • Copy the url in « Override Hook URL. And uncheck specify another hook url for GitHub Configurations.
  • 31. Contd. • The GitHub steps are pretty straight forward. Open the “Webhooks & Services” tab -> choose “Configure Services” -> find the Jenkins (GitHub plugin option) and fill it in with a similar URL to the following: • http://<Name of Jenkins server>:8080/github-webhook/
  • 32. Add WebHooks in Git Hub • The GitHub steps are pretty straight forward. Open the “Webhooks & Services” tab -> choose “Configure Services” -> find the Jenkins (GitHub plugin option) and fill it in with a similar URL to the following: • http://<Name of Jenkins server>:8080/github-webhook/
  • 33. Parameterised Builds • Allows user to provide parameters for Build in a URL. • Users are prompted to enter parameters before triggering build. • Exposes $Jenkins/job/$job/parambuild URL to trigger build with parameter.
  • 34. Credential Plugin • Provides convenient way to organize credentials across domains and maintains password secret once. • Used by other plugins indirectly when you are required to provide credentials. • There are multiple credentials plugin including. • Plain credentials • SSH Credentials • Google Oath • Dockers Common
  • 35. Credential Plugin • Kinds of Credentials • Username with password • SSH Username with private key • Certificate. • Scope of Credentials • Global- Available to the object on which credentials is associated and all objects that are children on that object. • System – Only available to object on which credentials is associated. Eg email
  • 36. Jenkins Copy Artifact • Allows you to copy artifacts built from other jobs into current workspace. • Select the option from Build Steps.
  • 37. Jenkins Copy Artifact (Contd) • Files matched by the "Artifacts to copy" field are copied to the same directory structure as the source build had You can use the "Flatten directories" option if you want the file(s) to be copied to the root of the build workspace. • Projects must enable “permission to copy Artifact” and select the project which is authorized to copy artifacts.
  • 38. • The location from which the artifacts are copied from is relative to: • - the artifacts folder, • - for the selected build, • - for the job you selected to copy from • So, first things first, you have to make sure that the job that you are copying from is actually archiving the artifacts. It will not copy files from workspace (there are other plugins for that). • To archive your artifacts, in the job the creates them, select post-build action "Archive the artifacts", then provide a list of artifacts you want to archive, relative to workspace. For example, to archive all zip files, regardless of where they are, use: **/*.zip • Or if you know that all your artifacts are inside the "build" folder, but there may be intermediate directories in between, use: build/**/*.zip • Or simply provide a full path: build/myartifactsfolder/myfile.zip Jenkins Copy Artifact (Contd)
  • 39. Jenkins Copy Artifact (Contd) • Now, to view the artifacts available, navigate in your browser to the URL of the job from which you want to copy, select the build you wish to copy from, and then append /artifact/ at the end, or just click "Build Artifacts" link on the page: example: http://localhost/job/YourJob/lastBuild/artifact/ • This will show a directory structure and all available artifacts. You can reference this in the "Copy Artifacts" post-build step directly. Or you can use wildcards. For example, if you want to ignore any directory structure, and just copy all *.zip files, your "Artifacts to copy" field should be: **/*.zip • The double stars ignore directories in between. You can use comma to separate multiple entries. Alternatively, if you leave this field blank, it will copy all available artifacts. • On the receiving end, the "Target directory" is relative to the Workspace of the job that is calling the "Copy Artifacts" step. • Lastly, if you don't care about the directory structure, check mark the "Flatten directories" option, so that all artifacts end up in the same place, ignoring any folders in between.
  • 40. Triggers • Manual Build • Click manually build now. • On Schedule • Use UNIX Cron rotation • Minutes • Hours • Day of month • Month • Day of week • When code changes in SCM • Polling SCM • Triggered on other builds.
  • 42. Cron Format • Jenkins uses UNIX Cron notation • Minutes (0-59) • * represents every value ***** means once every minute. • / allows you to skip e.g. */5 means every 5 minute. • Hours (0-23) • Commas represents list of values e.g. 2,3 means at 2 and 3 am in morning. • Day of month (1-31) • Month (1-12) • Day of week (0-7) • Ranges are allowed 1-5 means between Monday to Friday. 1. By setting the schedule period to 15 13 * * * you tell jenkins to schedule the build every day of every month of every year at the 15th minute of the 13th hour of the day. 2. If you want to schedule your build every 5 minutes, this will do the job : */5 * * * * 3. If you want to schedule your build every day at 8h00, this will do the job : 0 8 * * *
  • 43. Cron (Contd) • Jenkins lets you set up multiple times, separated by line breaks. • If you need it to build daily at 7am, along with every Sunday at 4pm, the below works well • H 7 * * * • H 16 * * 0
  • 44. Types of JOB • Maven • Free Style • Monitor an External Job • Multi Configurations jobs
  • 46. Maven vs FreeStyle • A maven project is a project that will analyze the pom.xml file in greater detail and produce a project that's geared towards the targets that are invoked. The maven project is smart enough to incorporate build targets like the javadoc or test targets and automatically setup the reports for those targets. There is little configuration required for it. See: http://wiki.hudson-ci.org/display/HUDSON/Building+a+maven2+project for more information on Maven project. • A Free-Style project is a project that can incorporate almost any type of build. While a maven project you can only build maven projects, the Free-Style project is the more "generic" form of a project. You can execute shell/dos scripts, invoke ant, and a lot more. Majority of the plugins are written to use the free-style project. The maven module is limited in that it can't invoke a shell script, or anything else just the maven targets. See: http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project for more information on a Free-Style project.
  • 49. Email
  • 50. Email
  • 51. Email Navigate to https://myaccount.google.com/lesssecureapps?pli=1 • Please enter your Gmail id when prompted while accessing the above url • Now turn on Allow less secure apps (This will enable your Gmail SMTP to interact with jenkins)
  • 52. Email / IRC integration Follow the steps as illustrated in previous slides Go to localhost:8080 (default port for Jenkins) Navigate to Manage Jenkins  Configure System Tick , Use SMTP Authentication Follow the details as per screenshot Give the username and password Tick, Use SSL Enter SMTP port Reply to address Charset Please enter a recipient email address Test by clicking on Test configuration
  • 53. Email Functionality • Default Email notification in Jenkins Post Build Action. • Email address can be separated by commas.
  • 54. Email (Contd) • Use Email Template management plugin if you don’t want use default one.
  • 56. User Access – Assign Roles to User
  • 57. Parameterization • Jenkins allows parameters to be set for builds. • While configuring job check the below option.
  • 58. Parameterization (Contd) • Simple Types • Boolean • Choice(Dropdown) • String • Text(Same as string but allow new lines) • Password(masked string) • Complex Types • File Parameters(Allows file to be uploaded) • Run parameters – Access past builds • Build Selector for copy artifact.
  • 59. Parameterization (Contd) • A parameterized job can be accessed by posting to • https://<yourserver>/job/$job/buildwithParameteres?PARAMETER=v alue
  • 60. Junit Test Report • Just make sure you build the maven with test profile.
  • 61. Health report amplification factor • The amplification factor to apply to test failures when computing the test result contribution to the build health score. • The default factor is 1.0 • A factor of 0.0 will disable the test result contribution to build health score. • A factor of 0.1 means that 10% of tests failing will score 99% health • A factor of 0.5 means that 10% of tests failing will score 95% health • A factor of 1.0 means that 10% of tests failing will score 90% health • A factor of 2.0 means that 10% of tests failing will score 80% health • A factor of 2.5 means that 10% of tests failing will score 75% health • A factor of 5.0 means that 10% of tests failing will score 50% health • A factor of 10.0 means that 10% of tests failing will score 0% health
  • 62. Contd
  • 63. Junit Test Report – Displaying test results
  • 66. Sample Report for PMD Plugin (Code Coverage tool)
  • 68. Maven and Code Coverage Tool Goals • For PMD:- pmd:pmd • For Corbertura:- cobertura:cobertura • For Find bugs :- findbugs:findbugs
  • 69. Cobertura Plugin – Post Build Actions
  • 71. Configure Pom.xml • To know how to configure pom.xml to set up code coverage tools. • Refer pom.xml of this project: https://github.com/Viyaan/JenkinsJobFlow
  • 72. HTML Validation • Install Unicorn Validator • In Build step select unicorn validator. • Enter the URL of site to validate.
  • 74. Backup and Restore • Install back up plugin.
  • 75. Set up for Backup Manager Plugin
  • 76. Backup Manager plugin parameters • Backup directory: A shared folder where back up is dumped. • Format: At what format it is dumped. • Verbose: Backup will be logged. • If you want to schedule your back periodically use thinBackup plugin.

Editor's Notes

  1. Tools can be either configured to be installed automatically or the path of the preinstalled tools can be specified.