SlideShare a Scribd company logo
Jenkins CI
Ruchi Agarwal
Sr Software Consultant
Knoldus Software LLP
Index:

About Jenkins CI

Install Jenkins

Configure Jenkins Job (Git/ Assembla)

Schedule Jenkins job

Post Build Actions : Extended E-mail Notification

Web Hooks (Git/ Assembla)

Matrix-based Security
About Jenkins:
- Jenkins is an open source continuous integration (CI) tool written in Java.
Continuous integration (CI) is the practice, in software engineering, of merging all developer
working copies with a shared mainline several times a day. The main aim of CI is to prevent
integration problems
- Jenkins provides continuous integration services for software development. It is a server-
based system running in a servlet container such as Apache Tomcat.
- It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce,
Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as
arbitrary shell scripts and Windows batch commands.
- Builds can be started by various means, including being triggered by commit in a version
control system, scheduling via a cron-like mechanism, building when other builds have
completed, and by requesting a specific build URL.
Install Jenkins
- Download Jenkins.war file:
$ wget http://ftp-chi.osuosl.org/pub/jenkins/war/1.592/jenkins.war
- Run Jenkins:
$ java -jar jenkins.war
- By default, Jenkins listen on port 8080. Access this port with browser to start configuration
Command Line Parameters
- To change port numer:
$ java -jar jenkins.war --httpPort=$HTTP_PORT
- Binds Jenkins to the specific IP address (deafult is 0.0.0.0)
$ java -jar jenkins.war --httpListenAddress=$HTTP_HOST
- Runs Jenkins to include the $PREFIX at the end of the URL
$ java -jar jenkins.war --prefix=$PREFIX
Configure a Jenkins Job : Git and Assembla
- Under ‘Manage Jenkins’ -> ‘Manage Plugins’, select and install following plugins:
•
Github and Git plugins
•
Assembla and Assembla Auth Plugin
- Restart after finish the installation. After this is installed either create a new build or configure
an existing build job
- Add github repository path
-> In "Source Code Management" select "Git"
a) Provide Repository URL
b) Credentials of Repositories for private repository (login access/ SSH key)
c) Branch to build (i.e. branchName)
- Add a Build step to the Execute shell command. This gives the ability to define a bash script to
perform build execution
- Save changes and Run a build.
- Jenkins clone the project in its workspace and after that execute provided shell command
script
Schedule Jenkins Job
- Under “Configure” -> “Build trigger” give the time in cron syntax for triggering a job
automatically in Jenkins
Examples:
•
*/1 * * * * : Every minute
•
0 0 1 * * : Once in a day
•
0 0 * * 0 : Once in a week
•
0 0 * * * : Once in a day
Post Build Actions : Extended E-mail Notification
- Jenkins privides post build actions which executes after the jenkins build. Jenkins allows to
have email notification for successful or failed build.
- Install “Manage Jenkins” -> “Manage plugins” -> ”Email-ext plugin"
- Go to Manage Jenkins -> Configure System ->
a) In Jenkins Location provide "System Admin E-mail Address"
b) Extended E-mail Notification : Set up mail subject and contents settings
- In E-mail Notifications provide smtp mail server configuration
- Save the changes
- Go to Project Configuration -> Post Build Action -> Select "Editable E-mail Notifications"
- Provide email id of people in "Project recipients list", Attach Build Log (This document would
contain complete build report and would be attached with Email)
- In "Advanced Settings" option, Set "Triggers" to "Always". This would sent notifications for
every successful and failed build with complete logs.
- Save the changes
WebHook
A WebHook is an HTTP callback: an HTTP POST that occurs when something happens or a
simple event-notification via HTTP POST.
Build Jenkins Job on Git Commit
- With the latest Git plugin 1.1.14, can do this more easily by simply executing the following
command:
curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>
- This will scan all the jobs that’s configured to check out the specified URL, and if they are also
configured with polling, it’ll immediately trigger the polling (and if that finds a change worth a
build, a build will be triggered in turn.)
- Follow the follwoing steps to set-up:

Go to “Configure” -> “Build Trigger”

Check “Poll SCM” : Leave the schedule field empty

Now, go to “Settings” page of your github repository (http://github.com/
<user_id>/<project_name>/settings)

Search for “Jenkins (Git Plugin)” under “Webhooks & Services” -> “Services” -> “Add
services”

Provide Jenkins url. "Jenkins Url" is the base URL of Jenkins server

This willl hit /git/notifyCommit under github repository URL
- Add service and That's It
- Commit the changes. This will trigger jenkins job
WebHook with Assembla
- Add a Webhook tool via the Admin → Tools on the Assembla home screen (this action
requires to have admin rights)
- Create a new Webhook with the following options:
Title : ‘Jenkins Commit’ or any;
Authentication type: Basic;
External url: {IP address of your jenks server}/git/notifyCommit?url=%{repository_url};
Http metod: Get;
Content type – text/plain;
Leave the content field empty and tick ‘Code commits’ at ‘Post updates about’ section.
Matrix-based security
- Matrix-based security is one of the authorization strategies available for securing Jenkins.
- It allows to grant specific permissions to users and groups. Follow the following steps to
enable security:

Activate “Enable Security” under “Manage Jenkins” -> “Configure Global Security”

Select “Jenkins’ own user database” from “Security Realm” and activate jenkins sign up

Select “Matrix-based security” and set the permissions to user/ group
- Save changes
Jenkins CI

More Related Content

What's hot

Supermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talkSupermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talk
Michael Peacock
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
Cliffano Subagio
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
haochenglee
 
JENKINS Training
JENKINS TrainingJENKINS Training
JENKINS Training
Nithin Kumar
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
Yoshan madhumal
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
Vinay H G
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
Ankur Goyal
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) PipelineAnatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Robert McDermott
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
Martin Málek
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
BugRaptors
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
Ashok Kumar
 
Hacking Jenkins
Hacking JenkinsHacking Jenkins
Hacking Jenkins
Miro Cupak
 
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
 
Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshop
Yoram Michaeli
 
Continous integration with jenkins
Continous integration with jenkinsContinous integration with jenkins
Continous integration with jenkins
vodQA
 

What's hot (20)

Supermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talkSupermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talk
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
JENKINS Training
JENKINS TrainingJENKINS Training
JENKINS Training
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) PipelineAnatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
 
Hacking Jenkins
Hacking JenkinsHacking Jenkins
Hacking 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
 
Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshop
 
Continous integration with jenkins
Continous integration with jenkinsContinous integration with jenkins
Continous integration with jenkins
 

Similar to Jenkins CI

Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with Python
Inexture Solutions
 
Drupal Continuous Integration with Jenkins - Deploy
Drupal Continuous Integration with Jenkins - DeployDrupal Continuous Integration with Jenkins - Deploy
Drupal Continuous Integration with Jenkins - Deploy
John Smith
 
Jenkins Automation
Jenkins AutomationJenkins Automation
Jenkins Automation
Julien Pivotto
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
NETWAYS
 
OSDC 2017 | Automating Jenkins by Julien Pivotto
OSDC 2017 | Automating Jenkins by Julien PivottoOSDC 2017 | Automating Jenkins by Julien Pivotto
OSDC 2017 | Automating Jenkins by Julien Pivotto
NETWAYS
 
Managing Jenkins with Python
Managing Jenkins with PythonManaging Jenkins with Python
Managing Jenkins with Python
Vijay Kumar Bagavath Singh
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkins
Alex Galkin
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
Michal Ziarnik
 
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
VladLica
 
Dev Ops
Dev OpsDev Ops
Dev Ops
Narayana B
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
Max Lobur
 
Basic Rails Training
Basic Rails TrainingBasic Rails Training
Basic Rails Training
Arthit Hongchintakul
 
Jenkins Tutorial.pdf
Jenkins Tutorial.pdfJenkins Tutorial.pdf
Jenkins Tutorial.pdf
devtestervicky
 
How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7
AniketGoyal14
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
Matt Callanan
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
Aleksandra Gavrilovska
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
DevOps_project.pdf
DevOps_project.pdfDevOps_project.pdf
DevOps_project.pdf
Prateek Srivastava
 
Web works hol
Web works holWeb works hol
Web works hol
momoahmedabad
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
Giacomo Vacca
 

Similar to Jenkins CI (20)

Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with Python
 
Drupal Continuous Integration with Jenkins - Deploy
Drupal Continuous Integration with Jenkins - DeployDrupal Continuous Integration with Jenkins - Deploy
Drupal Continuous Integration with Jenkins - Deploy
 
Jenkins Automation
Jenkins AutomationJenkins Automation
Jenkins Automation
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
 
OSDC 2017 | Automating Jenkins by Julien Pivotto
OSDC 2017 | Automating Jenkins by Julien PivottoOSDC 2017 | Automating Jenkins by Julien Pivotto
OSDC 2017 | Automating Jenkins by Julien Pivotto
 
Managing Jenkins with Python
Managing Jenkins with PythonManaging Jenkins with Python
Managing Jenkins with Python
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkins
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
 
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
 
Dev Ops
Dev OpsDev Ops
Dev Ops
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 
Basic Rails Training
Basic Rails TrainingBasic Rails Training
Basic Rails Training
 
Jenkins Tutorial.pdf
Jenkins Tutorial.pdfJenkins Tutorial.pdf
Jenkins Tutorial.pdf
 
How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
DevOps_project.pdf
DevOps_project.pdfDevOps_project.pdf
DevOps_project.pdf
 
Web works hol
Web works holWeb works hol
Web works hol
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 

More from Knoldus Inc.

Terratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructureTerratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructure
Knoldus Inc.
 
Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)
Knoldus Inc.
 
Secure practices with dot net services.pptx
Secure practices with dot net services.pptxSecure practices with dot net services.pptx
Secure practices with dot net services.pptx
Knoldus Inc.
 
Distributed Cache with dot microservices
Distributed Cache with dot microservicesDistributed Cache with dot microservices
Distributed Cache with dot microservices
Knoldus Inc.
 
Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)
Knoldus Inc.
 
Using InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in JmeterUsing InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in Jmeter
Knoldus Inc.
 
Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)
Knoldus Inc.
 
Stakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) PresentationStakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) Presentation
Knoldus Inc.
 
Introduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) PresentationIntroduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) Presentation
Knoldus Inc.
 
Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)
Knoldus Inc.
 
Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)
Knoldus Inc.
 
Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
Knoldus Inc.
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
Knoldus Inc.
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
Knoldus Inc.
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
Knoldus Inc.
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
Knoldus Inc.
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
Knoldus Inc.
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Knoldus Inc.
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
Knoldus Inc.
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
Knoldus Inc.
 

More from Knoldus Inc. (20)

Terratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructureTerratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructure
 
Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)
 
Secure practices with dot net services.pptx
Secure practices with dot net services.pptxSecure practices with dot net services.pptx
Secure practices with dot net services.pptx
 
Distributed Cache with dot microservices
Distributed Cache with dot microservicesDistributed Cache with dot microservices
Distributed Cache with dot microservices
 
Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)
 
Using InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in JmeterUsing InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in Jmeter
 
Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)
 
Stakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) PresentationStakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) Presentation
 
Introduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) PresentationIntroduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) Presentation
 
Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)
 
Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)
 
Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 

Recently uploaded

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 

Recently uploaded (20)

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 

Jenkins CI

  • 1. Jenkins CI Ruchi Agarwal Sr Software Consultant Knoldus Software LLP
  • 2. Index:  About Jenkins CI  Install Jenkins  Configure Jenkins Job (Git/ Assembla)  Schedule Jenkins job  Post Build Actions : Extended E-mail Notification  Web Hooks (Git/ Assembla)  Matrix-based Security
  • 3. About Jenkins: - Jenkins is an open source continuous integration (CI) tool written in Java. Continuous integration (CI) is the practice, in software engineering, of merging all developer working copies with a shared mainline several times a day. The main aim of CI is to prevent integration problems - Jenkins provides continuous integration services for software development. It is a server- based system running in a servlet container such as Apache Tomcat. - It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. - Builds can be started by various means, including being triggered by commit in a version control system, scheduling via a cron-like mechanism, building when other builds have completed, and by requesting a specific build URL.
  • 4. Install Jenkins - Download Jenkins.war file: $ wget http://ftp-chi.osuosl.org/pub/jenkins/war/1.592/jenkins.war - Run Jenkins: $ java -jar jenkins.war - By default, Jenkins listen on port 8080. Access this port with browser to start configuration Command Line Parameters - To change port numer: $ java -jar jenkins.war --httpPort=$HTTP_PORT - Binds Jenkins to the specific IP address (deafult is 0.0.0.0) $ java -jar jenkins.war --httpListenAddress=$HTTP_HOST - Runs Jenkins to include the $PREFIX at the end of the URL $ java -jar jenkins.war --prefix=$PREFIX
  • 5. Configure a Jenkins Job : Git and Assembla - Under ‘Manage Jenkins’ -> ‘Manage Plugins’, select and install following plugins: • Github and Git plugins • Assembla and Assembla Auth Plugin - Restart after finish the installation. After this is installed either create a new build or configure an existing build job - Add github repository path -> In "Source Code Management" select "Git" a) Provide Repository URL b) Credentials of Repositories for private repository (login access/ SSH key) c) Branch to build (i.e. branchName)
  • 6. - Add a Build step to the Execute shell command. This gives the ability to define a bash script to perform build execution - Save changes and Run a build. - Jenkins clone the project in its workspace and after that execute provided shell command script
  • 7. Schedule Jenkins Job - Under “Configure” -> “Build trigger” give the time in cron syntax for triggering a job automatically in Jenkins Examples: • */1 * * * * : Every minute • 0 0 1 * * : Once in a day • 0 0 * * 0 : Once in a week • 0 0 * * * : Once in a day
  • 8. Post Build Actions : Extended E-mail Notification - Jenkins privides post build actions which executes after the jenkins build. Jenkins allows to have email notification for successful or failed build. - Install “Manage Jenkins” -> “Manage plugins” -> ”Email-ext plugin" - Go to Manage Jenkins -> Configure System -> a) In Jenkins Location provide "System Admin E-mail Address" b) Extended E-mail Notification : Set up mail subject and contents settings
  • 9. - In E-mail Notifications provide smtp mail server configuration - Save the changes - Go to Project Configuration -> Post Build Action -> Select "Editable E-mail Notifications" - Provide email id of people in "Project recipients list", Attach Build Log (This document would contain complete build report and would be attached with Email) - In "Advanced Settings" option, Set "Triggers" to "Always". This would sent notifications for every successful and failed build with complete logs. - Save the changes
  • 10. WebHook A WebHook is an HTTP callback: an HTTP POST that occurs when something happens or a simple event-notification via HTTP POST. Build Jenkins Job on Git Commit - With the latest Git plugin 1.1.14, can do this more easily by simply executing the following command: curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository> - This will scan all the jobs that’s configured to check out the specified URL, and if they are also configured with polling, it’ll immediately trigger the polling (and if that finds a change worth a build, a build will be triggered in turn.) - Follow the follwoing steps to set-up:  Go to “Configure” -> “Build Trigger”  Check “Poll SCM” : Leave the schedule field empty  Now, go to “Settings” page of your github repository (http://github.com/ <user_id>/<project_name>/settings)  Search for “Jenkins (Git Plugin)” under “Webhooks & Services” -> “Services” -> “Add services”
  • 11.  Provide Jenkins url. "Jenkins Url" is the base URL of Jenkins server  This willl hit /git/notifyCommit under github repository URL - Add service and That's It - Commit the changes. This will trigger jenkins job
  • 12. WebHook with Assembla - Add a Webhook tool via the Admin → Tools on the Assembla home screen (this action requires to have admin rights) - Create a new Webhook with the following options: Title : ‘Jenkins Commit’ or any; Authentication type: Basic; External url: {IP address of your jenks server}/git/notifyCommit?url=%{repository_url}; Http metod: Get; Content type – text/plain; Leave the content field empty and tick ‘Code commits’ at ‘Post updates about’ section.
  • 13. Matrix-based security - Matrix-based security is one of the authorization strategies available for securing Jenkins. - It allows to grant specific permissions to users and groups. Follow the following steps to enable security:  Activate “Enable Security” under “Manage Jenkins” -> “Configure Global Security”  Select “Jenkins’ own user database” from “Security Realm” and activate jenkins sign up
  • 14.  Select “Matrix-based security” and set the permissions to user/ group - Save changes