SlideShare a Scribd company logo
1
Git & Jenkins Introduction
2
Agenda
1. Git
1. Core concepts
2. Installation
3. Basic usage
2. Jenkins
1. What’s it? Why do we need it?
2. Terminologies
3. Jenkins architecture
3. Demo (integrate Jenkins with Git)
3
1 What’s Git?
 The most commonly used version control
system (VCS) today.
 Distributed VCS, meaning your local copy of
code is a complete version control
repository.
 These fully-functional local repositories
make it is easy to work offline or remotely.
4
1.1 Core concepts
 Repository
● Collection of files and their history organized in folders, branches, tags
● Is stored in a normal file system somewhere
● Can be on a local machine or a remote machine
● To work with GIT you will need a repo somewhere
● When creating a new one… it’s empty
5
1.1 Core concepts (cont.)
 Index (Staging area)
● Snapshot of files in the workspace.
● You add to the index files you change / remove etc.
 Commit
● A snapshot of the workspace at some point
● Has unique revision number
● Knows the commit (commits) that it’s based on
6
1.1 Core concepts (cont.)
7
1.2 Installation
 Download installation at: https://git-scm.com/download
● Windows: Run installation file.
● Ubuntu:
sudo apt install git
● RedHat/CentOS:
sudo yum install git
 Verify installation:
git --version
8
1.3 Basic usage - Configuration
 3 config files:
/etc/gitconfig -> all users, repositories (--system)
~/.gitconfig - > one user, all repositories (--global)
[repo]/.git/config -> specific to repository (default)
 Your identity – information for each commit:
git config --global user.name “An Nguyen”
git config –global user.email nthienan@tma.com.vn
 List all config values:
git config --list
9
1.3 Basic usage - Configuration (cont.)
 Merge tool:
git config --global --add merge.tool kdiff3
git config --global --add mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
git config --global --add mergetool.kdiff3.trustExitCode false
 Diff tool:
git config --global --add diff.guitool kdiff3
git config --global --add difftool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
git config --global --add difftool.kdiff3.trustExitCode false
10
1.3 Basic usage - Create repository
 Initialized a repo:
git init
 Clone – creates a local repository by copying another (remote) repository
git clone <repo_url>
 Clone existing repo into directory
git clone <repo_url> <directory_name>
11
1.3 Basic usage - Working with files
• Add changes to index (staging area):
git add <file_path>
git add –A
• Unstage files:
git reset HEAD <file_path>
• Reset all changes:
git reset --hard
• Discard unstaged changes in a file:
git checkout <file_path>
• Commit:
• git commit –m “message”
• git commit –am “message”
12
1.3 Basic usage - View changes
 Show status of files:
git status
 Show unstage changes:
git diff
git difftool
 Show staged changes:
git diff --cached
git difftool --cached
13
1.3 Basic usage - View history
 Show log:
git log [-n] [--pretty] [--graph]
-n <number_of_commit>: show n commit
--pretty=<format>: display format. See pretty format here
--graph: show history in diagram
Ex: git log -n 10 --pretty=short—graph
 There’re many GUI tools: SourceTree, GitHub Desktop, Git Extensions
14
1.3 Basic usage - Branches
 Branch is a pointer to a commit
 A branch can point at other commits – it can move
 A branch is a way to organize working histories
 The default branch name in Git is master
 There is 2 types of branch: local and remote.
 Remote branches represent the state of a branch on the repository it is fetched
from
 You cannot checkout a remote branch. You create a local pointer to it
15
1.3 Basic usage - Branches
 When doing a “commit” the current “branch” moves to point at the new
commit
C3 C2 C1bx
C3 C2 C1bx C4
16
1.3 Basic usage - Branches
 Here is a branch
 Creating a new branch just adds another “pointer” to the same commit
C3 C2 C1bx
C3 C2 C1
bx
by
17
1.3 Basic usage - Branches
 Other branches are not affected by a commit
C3 C2 C1
bx
by
C3 C2 C1
bx
by
C4
18
1.3 Basic usage - Branches (cont.)
 List all local branches:
git branch
 List all remote branches:
git branch –r
 Create new branch:
git branch <branch_name>
 Switch branch:
git checkout <branh_name>
 Create new branch and switch to it:
git checkout -b <branch_name>
 Delete branch:
git branch –d <name>
Safe operation, prevents deleting branch
unmerged.
git branch –D <name> :
Force delete branch
 Rename branch
git branch –m <new_name>
19
1.3 Basic usage - Merging
 Merge the specified branch into
the current branch
● git merge <branch_name>
 Merge the specified branch into
the current branch, but always
generate a merge commit:
● git merge --no-ff <branch_name>
20
1.3 Basic usage - Resolving Conflicts
If the two branches you're trying to merge both changed the same part of the same
file => conflict => stop merge process
CONFLICT (content): Merge conflict in <file_paths>
Automatic merge failed; fix conflicts and then commit the result.
 Using merge tool to resolve conflicts:
git mergetool : open merge tool so that you can resolve the conflicts manually.
git commit : commit merge change and finish merge action.
21
1.3 Basic usage - Remote
 Remotes are just symbolic
names
 You can have as many as you
like
 The default name is origin if
you’ve cloned
 Remote-tracking branches are
locally immutable
My Machine The Server
C1
master
C0
cloneC1
origin/master
C0
master
22
1.3 Basic usage - Fetch
 Fetch – gets changes from a remote repository that you don’t already have.
 Fetch gets the changes to the local repository but does not touch the index or
workspace.
 After a fetch, usually a merge needs to take place
git fetch
git merge <remote>/<branch>
23
1.3 Basic usage - Fetch (cont.)
My Machine
The Server
C1
C0
master
C2
C1
origin/master
C0
master
fetch
My Machine The Server
C1
C0
master
C2
C1
origin/master
C0
masterC2
24
1.3 Basic usage - Pull
 Pull is just a shortcut command to do:
1. Fetch from a remote
2. Merge changes from “remote branch” into the “remote tracking branch”
 Sometimes the tool would also allow to “commit” merges for you right after the
pull (not part of pull, but a helper)
git pull
25
1.3 Basic usage - Push
 Will take local objects (commits, tags) which are required to make a remote
branch complete – and send them.
 Will merge those local changes into the remote branch
 Will only do a “fast-forward” merge (other merge type, if required, will fail the
push)
 Push to existing branch
git push
 Push new branch
git push –u <remote> <branch>
26
1.3 Basic usage - Push (cont.)
My Machine The Server
C1
C0
master
C2
C1
origin/master
C0
master
C2
C3
My Machine The Server
C1
C0
master
C2
C1
origin/master
C0
master
C2
C3 C3
27
1.3 Basic usage - Push (cont.)
 If cannot do a fast-forward – will fail. Then, a fetch + merge (or pull) is required to
allow the push.
 Once remote changes merged locally again a fast forward is possible and the push
would work
28
1.3 Basic usage - Push (cont.)
My Machine The Server
C1
C0
master
C2
C1
origin/master
C0
master
C2
C3 C4
push
My Machine The Server
C1
C0
master
C2
C1
origin/master
C0
master
C2
C3
C4
C4
C5
29
1.3 Basic usage - Push (cont.)
My Machine The Server
C1
C0
master
C2
C1
origin/master
C0
master
C2
C3
C4
C4
C5
push
My Machine The Server
C1
origin/master
C0
master
C2
C3
C4
C5
C1
C0
master
C2
C3
C4
C5
30
2.1 What’s Jenkins?
 Continuous integration server - detects changes
in Subversion, performs tasks, repeatedly (build,
test, deploy, package, etc.)
 An open source continuous integration tool
written in Java.
 It is a server-based system running in a servlet
container such as Apache Tomcat
31
2.1 Why do we need?
 To integrate more frequently, detect errors quicker, improve quality and reduce
cost
 Co-ordinate the running of tasks as part of workflows.
 Compile, test and package, deploy, script, verify
32
2.2 Terminology
 Job - a unit of work for a project
 View - user defined collection of jobs or a workflow
 Master - the central Jenkins master, does job scheduling
 Slave - executes one or more jobs within slots (executors)
 Workspace - the working area where a job is carried out
33
2.3 Architecture
34
2.3 Architecture (cont.)
35
2.3 Jenkins Features
 Trigger a build
 Get source code from repository
 Automatically build and test
 Generate report & notify
 Deploy
 Distributed build
36
2.3 Jenkins Plugins
 Build triggers
 Source code management
 Build tools
 Build wrappers
 Build notifiers
 Build reports
 Artifact uploaders
 UI plugins
 Authentication and user management
37
2.3 Build Trigger
 Manually click build button
 Build periodically
 Poll SCM
 Build after other projects are built
38
2.3 Security Management
 Security Realm
● LDAP
● Jenkins's own user database
 Authorization
● Anyone can do anything
● Logged-in users can do anything
● Matrix-based security
● Project-based Matrix Authorization Strategy
39
2.3 Jenkins Pipeline
40
2.3 Test Code Coverage
Ref: http://cobertura.sourceforge.net/sample/
41
2.3 How does Jenkins fit into your work?
42
3. Demo

More Related Content

PDF
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
PPTX
Terraform Basics
PDF
Jenkins Pipelines
PDF
intro to DevOps
PPTX
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
PPTX
Introduction to DevOps
PDF
Jenkins
PPTX
Introduction to Gitlab | Gitlab 101 | Training Session
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
Terraform Basics
Jenkins Pipelines
intro to DevOps
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Introduction to DevOps
Jenkins
Introduction to Gitlab | Gitlab 101 | Training Session

What's hot (20)

PPTX
Comprehensive Terraform Training
PDF
DevOps for beginners
PDF
Git 101: Git and GitHub for Beginners
PDF
Git flow
PPTX
Azure DevOps
PPTX
GitLab.pptx
PDF
Grafana 7.0
PDF
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
PDF
Introduction to GitHub Actions
PDF
DevOps
PDF
Git flow Introduction
PDF
Git Branching Model
PDF
Designing a complete ci cd pipeline using argo events, workflow and cd products
PDF
Git and git flow
ODP
An Introduction To Jenkins
PDF
Continuous Integration/Deployment with Gitlab CI
PDF
Terraform -- Infrastructure as Code
PPSX
PDF
Apache Airflow
PDF
Gitlab, GitOps & ArgoCD
Comprehensive Terraform Training
DevOps for beginners
Git 101: Git and GitHub for Beginners
Git flow
Azure DevOps
GitLab.pptx
Grafana 7.0
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
Introduction to GitHub Actions
DevOps
Git flow Introduction
Git Branching Model
Designing a complete ci cd pipeline using argo events, workflow and cd products
Git and git flow
An Introduction To Jenkins
Continuous Integration/Deployment with Gitlab CI
Terraform -- Infrastructure as Code
Apache Airflow
Gitlab, GitOps & ArgoCD
Ad

Similar to Introduce to Git and Jenkins (20)

PPT
Introduction to git
PPT
Git training
PPT
Git presentation
PPT
Fundamentals and basics of Git and commands
PPTX
Git Overview
PPTX
GIT INTRODUCTION
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPT
ODP
Introduction to Git
PPT
Introduction to Git
PPT
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
PPT
Git and GitHUB Explanation and simple coding for CLI
PDF
Harvard ABCD-WWW Git presentation
PDF
Git basics
PDF
Collaborative development with Git | Workshop
PDF
Download full ebook of Version Control With Git Jon Loeliger instant download...
PPTX
Git workshop 33degree 2011 krakow
PPTX
Git One Day Training Notes
PDF
Git training
Introduction to git
Git training
Git presentation
Fundamentals and basics of Git and commands
Git Overview
GIT INTRODUCTION
Let's Git this Party Started: An Introduction to Git and GitHub
Introduction to Git
Introduction to Git
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
Git and GitHUB Explanation and simple coding for CLI
Harvard ABCD-WWW Git presentation
Git basics
Collaborative development with Git | Workshop
Download full ebook of Version Control With Git Jon Loeliger instant download...
Git workshop 33degree 2011 krakow
Git One Day Training Notes
Git training
Ad

More from An Nguyen (17)

PPTX
Terraform
PPTX
CI/CD Overview
PPTX
Introduce to Credstash
PPTX
Introduction To AWS & AWS Lambda
PPTX
Introduction To Docker, Docker Compose, Docker Swarm
PPTX
Secret Management with Hashicorp Vault and Consul on Kubernetes
PPTX
Spring framework
PDF
Luận văn tìm hiểu Spring
PDF
Terminal Services and VPN
PPTX
Tân sinh viên TECH - AGU 2014
PDF
Quy tắc thiết kế giao diện và viết code C#
PPTX
Nêu cao tinh thần trách nhiệm, chống chủ nghĩa cá nhân, nói đi đôi với làm
PDF
Hướng dẫn lập trình quản lý c#
PDF
Quản lý quan hệ khách hàng
PPTX
Quản lý quan hệ khách hàng
PDF
RichTetxtBox control
PDF
Hội nghị học tốt CNTT 2013 - An Giang University
Terraform
CI/CD Overview
Introduce to Credstash
Introduction To AWS & AWS Lambda
Introduction To Docker, Docker Compose, Docker Swarm
Secret Management with Hashicorp Vault and Consul on Kubernetes
Spring framework
Luận văn tìm hiểu Spring
Terminal Services and VPN
Tân sinh viên TECH - AGU 2014
Quy tắc thiết kế giao diện và viết code C#
Nêu cao tinh thần trách nhiệm, chống chủ nghĩa cá nhân, nói đi đôi với làm
Hướng dẫn lập trình quản lý c#
Quản lý quan hệ khách hàng
Quản lý quan hệ khách hàng
RichTetxtBox control
Hội nghị học tốt CNTT 2013 - An Giang University

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Digital Strategies for Manufacturing Companies
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Introduction to Artificial Intelligence
PPTX
L1 - Introduction to python Backend.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Design an Analysis of Algorithms I-SECS-1021-03
Softaken Excel to vCard Converter Software.pdf
Transform Your Business with a Software ERP System
How to Migrate SBCGlobal Email to Yahoo Easily
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Which alternative to Crystal Reports is best for small or large businesses.pdf
Digital Strategies for Manufacturing Companies
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
VVF-Customer-Presentation2025-Ver1.9.pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Introduction to Artificial Intelligence
L1 - Introduction to python Backend.pptx
PTS Company Brochure 2025 (1).pdf.......
2025 Textile ERP Trends: SAP, Odoo & Oracle
Design an Analysis of Algorithms II-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Design an Analysis of Algorithms I-SECS-1021-03

Introduce to Git and Jenkins

  • 1. 1 Git & Jenkins Introduction
  • 2. 2 Agenda 1. Git 1. Core concepts 2. Installation 3. Basic usage 2. Jenkins 1. What’s it? Why do we need it? 2. Terminologies 3. Jenkins architecture 3. Demo (integrate Jenkins with Git)
  • 3. 3 1 What’s Git?  The most commonly used version control system (VCS) today.  Distributed VCS, meaning your local copy of code is a complete version control repository.  These fully-functional local repositories make it is easy to work offline or remotely.
  • 4. 4 1.1 Core concepts  Repository ● Collection of files and their history organized in folders, branches, tags ● Is stored in a normal file system somewhere ● Can be on a local machine or a remote machine ● To work with GIT you will need a repo somewhere ● When creating a new one… it’s empty
  • 5. 5 1.1 Core concepts (cont.)  Index (Staging area) ● Snapshot of files in the workspace. ● You add to the index files you change / remove etc.  Commit ● A snapshot of the workspace at some point ● Has unique revision number ● Knows the commit (commits) that it’s based on
  • 7. 7 1.2 Installation  Download installation at: https://git-scm.com/download ● Windows: Run installation file. ● Ubuntu: sudo apt install git ● RedHat/CentOS: sudo yum install git  Verify installation: git --version
  • 8. 8 1.3 Basic usage - Configuration  3 config files: /etc/gitconfig -> all users, repositories (--system) ~/.gitconfig - > one user, all repositories (--global) [repo]/.git/config -> specific to repository (default)  Your identity – information for each commit: git config --global user.name “An Nguyen” git config –global user.email nthienan@tma.com.vn  List all config values: git config --list
  • 9. 9 1.3 Basic usage - Configuration (cont.)  Merge tool: git config --global --add merge.tool kdiff3 git config --global --add mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe" git config --global --add mergetool.kdiff3.trustExitCode false  Diff tool: git config --global --add diff.guitool kdiff3 git config --global --add difftool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe" git config --global --add difftool.kdiff3.trustExitCode false
  • 10. 10 1.3 Basic usage - Create repository  Initialized a repo: git init  Clone – creates a local repository by copying another (remote) repository git clone <repo_url>  Clone existing repo into directory git clone <repo_url> <directory_name>
  • 11. 11 1.3 Basic usage - Working with files • Add changes to index (staging area): git add <file_path> git add –A • Unstage files: git reset HEAD <file_path> • Reset all changes: git reset --hard • Discard unstaged changes in a file: git checkout <file_path> • Commit: • git commit –m “message” • git commit –am “message”
  • 12. 12 1.3 Basic usage - View changes  Show status of files: git status  Show unstage changes: git diff git difftool  Show staged changes: git diff --cached git difftool --cached
  • 13. 13 1.3 Basic usage - View history  Show log: git log [-n] [--pretty] [--graph] -n <number_of_commit>: show n commit --pretty=<format>: display format. See pretty format here --graph: show history in diagram Ex: git log -n 10 --pretty=short—graph  There’re many GUI tools: SourceTree, GitHub Desktop, Git Extensions
  • 14. 14 1.3 Basic usage - Branches  Branch is a pointer to a commit  A branch can point at other commits – it can move  A branch is a way to organize working histories  The default branch name in Git is master  There is 2 types of branch: local and remote.  Remote branches represent the state of a branch on the repository it is fetched from  You cannot checkout a remote branch. You create a local pointer to it
  • 15. 15 1.3 Basic usage - Branches  When doing a “commit” the current “branch” moves to point at the new commit C3 C2 C1bx C3 C2 C1bx C4
  • 16. 16 1.3 Basic usage - Branches  Here is a branch  Creating a new branch just adds another “pointer” to the same commit C3 C2 C1bx C3 C2 C1 bx by
  • 17. 17 1.3 Basic usage - Branches  Other branches are not affected by a commit C3 C2 C1 bx by C3 C2 C1 bx by C4
  • 18. 18 1.3 Basic usage - Branches (cont.)  List all local branches: git branch  List all remote branches: git branch –r  Create new branch: git branch <branch_name>  Switch branch: git checkout <branh_name>  Create new branch and switch to it: git checkout -b <branch_name>  Delete branch: git branch –d <name> Safe operation, prevents deleting branch unmerged. git branch –D <name> : Force delete branch  Rename branch git branch –m <new_name>
  • 19. 19 1.3 Basic usage - Merging  Merge the specified branch into the current branch ● git merge <branch_name>  Merge the specified branch into the current branch, but always generate a merge commit: ● git merge --no-ff <branch_name>
  • 20. 20 1.3 Basic usage - Resolving Conflicts If the two branches you're trying to merge both changed the same part of the same file => conflict => stop merge process CONFLICT (content): Merge conflict in <file_paths> Automatic merge failed; fix conflicts and then commit the result.  Using merge tool to resolve conflicts: git mergetool : open merge tool so that you can resolve the conflicts manually. git commit : commit merge change and finish merge action.
  • 21. 21 1.3 Basic usage - Remote  Remotes are just symbolic names  You can have as many as you like  The default name is origin if you’ve cloned  Remote-tracking branches are locally immutable My Machine The Server C1 master C0 cloneC1 origin/master C0 master
  • 22. 22 1.3 Basic usage - Fetch  Fetch – gets changes from a remote repository that you don’t already have.  Fetch gets the changes to the local repository but does not touch the index or workspace.  After a fetch, usually a merge needs to take place git fetch git merge <remote>/<branch>
  • 23. 23 1.3 Basic usage - Fetch (cont.) My Machine The Server C1 C0 master C2 C1 origin/master C0 master fetch My Machine The Server C1 C0 master C2 C1 origin/master C0 masterC2
  • 24. 24 1.3 Basic usage - Pull  Pull is just a shortcut command to do: 1. Fetch from a remote 2. Merge changes from “remote branch” into the “remote tracking branch”  Sometimes the tool would also allow to “commit” merges for you right after the pull (not part of pull, but a helper) git pull
  • 25. 25 1.3 Basic usage - Push  Will take local objects (commits, tags) which are required to make a remote branch complete – and send them.  Will merge those local changes into the remote branch  Will only do a “fast-forward” merge (other merge type, if required, will fail the push)  Push to existing branch git push  Push new branch git push –u <remote> <branch>
  • 26. 26 1.3 Basic usage - Push (cont.) My Machine The Server C1 C0 master C2 C1 origin/master C0 master C2 C3 My Machine The Server C1 C0 master C2 C1 origin/master C0 master C2 C3 C3
  • 27. 27 1.3 Basic usage - Push (cont.)  If cannot do a fast-forward – will fail. Then, a fetch + merge (or pull) is required to allow the push.  Once remote changes merged locally again a fast forward is possible and the push would work
  • 28. 28 1.3 Basic usage - Push (cont.) My Machine The Server C1 C0 master C2 C1 origin/master C0 master C2 C3 C4 push My Machine The Server C1 C0 master C2 C1 origin/master C0 master C2 C3 C4 C4 C5
  • 29. 29 1.3 Basic usage - Push (cont.) My Machine The Server C1 C0 master C2 C1 origin/master C0 master C2 C3 C4 C4 C5 push My Machine The Server C1 origin/master C0 master C2 C3 C4 C5 C1 C0 master C2 C3 C4 C5
  • 30. 30 2.1 What’s Jenkins?  Continuous integration server - detects changes in Subversion, performs tasks, repeatedly (build, test, deploy, package, etc.)  An open source continuous integration tool written in Java.  It is a server-based system running in a servlet container such as Apache Tomcat
  • 31. 31 2.1 Why do we need?  To integrate more frequently, detect errors quicker, improve quality and reduce cost  Co-ordinate the running of tasks as part of workflows.  Compile, test and package, deploy, script, verify
  • 32. 32 2.2 Terminology  Job - a unit of work for a project  View - user defined collection of jobs or a workflow  Master - the central Jenkins master, does job scheduling  Slave - executes one or more jobs within slots (executors)  Workspace - the working area where a job is carried out
  • 35. 35 2.3 Jenkins Features  Trigger a build  Get source code from repository  Automatically build and test  Generate report & notify  Deploy  Distributed build
  • 36. 36 2.3 Jenkins Plugins  Build triggers  Source code management  Build tools  Build wrappers  Build notifiers  Build reports  Artifact uploaders  UI plugins  Authentication and user management
  • 37. 37 2.3 Build Trigger  Manually click build button  Build periodically  Poll SCM  Build after other projects are built
  • 38. 38 2.3 Security Management  Security Realm ● LDAP ● Jenkins's own user database  Authorization ● Anyone can do anything ● Logged-in users can do anything ● Matrix-based security ● Project-based Matrix Authorization Strategy
  • 40. 40 2.3 Test Code Coverage Ref: http://cobertura.sourceforge.net/sample/
  • 41. 41 2.3 How does Jenkins fit into your work?

Editor's Notes

  • #4: Quickly becoming the standard for version control You commit your work locally, and then sync your copy of the repository with the copy on the server. This paradigm differs from centralized version control where clients must synchronize code with a server before creating new versions of code.
  • #7: Git views untracked and modified files similarly. Untracked means that the file is new to your Git project. Modified means that the file has been seen before, but has been changed, so is not ready to be snapshotted by Git. Modification of a file occurs in your working directory When a file becomes staged, it's taken into the staging area. This is where Git is able to take a snapshot of it and store its current state to your local repository. This area is also known as the Index Committed means that Git has officially taken a snapshot of the files in the staging area, and stored a unique index in the Git directory. The terms snapshotted and committed are very similar
  • #20: Note that all of the commands presented below merge into the current branch. The current branch will be updated to reflect the merge, but the target branch will be completely unaffected