0% found this document useful (0 votes)
1 views20 pages

Jenkinshandnotes Devops

The document outlines the process for building and deploying applications using Jenkins, including steps for continuous integration and deployment. It details the setup of Jenkins, managing builds, handling bugs, and utilizing GitHub for version control. Additionally, it discusses the importance of maintaining code quality and provides instructions for backup and recovery processes.

Uploaded by

deepaknaik850
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views20 pages

Jenkinshandnotes Devops

The document outlines the process for building and deploying applications using Jenkins, including steps for continuous integration and deployment. It details the setup of Jenkins, managing builds, handling bugs, and utilizing GitHub for version control. Additionally, it discusses the importance of maintaining code quality and provides instructions for backup and recovery processes.

Uploaded by

deepaknaik850
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

h

a dplein
develpd Rdad lldy Lahng
7
ttoe
JENEINS,

[Link] uhim (LI) Jlgaliap t Changs


ilko.d omua e Vend
deMela pumet ltam Codinoud,
Wa Con a qai tderclopad

Conhinoua DeleyCc)
Each hanga delopmd
lmiaud
ttam kaanld bebult and deploy t
aal honge

Tested build haudd ba deplaad


Lontinaua Deplayemu Cco)
eduehm enrmmed a orlaPossibk
To

Pre bulld T a hio w a pdfelalest ov updated


Louo ta Code o g hub

Build In Ihs daa we Loplla all f soui Coda


and 9cuerat a build

Pat build A f bild uarated wedaplay


Auy VT, fh h Called 120s build

Bug hocbing LL tase lanpaue ere aing fhà lealing.


i D rock buog and araise a tks 1thenc
he b a bug tam o 1ill be
nesalved la dMedopyevn

SJRA L 1h Wei Can Aaite ik tradk 1ldnk


dona bSha Calvedvpdtewn Ataluy Cmd
aMlgad o ded bug aceig tosi
Sps o cheut Prl ot icteh
t a e of+cki

bpeM
May
Citit
An
Jn ogresj

Peaotved od
Tu
Closed

JenbinsJasallatin

no toJenktneiD paag
e baac poeka
tup The nus kenver bj insladling all
araWge Maven, ws)

un CoMAand ia th Jenkinc dounlosd

2 Todlotl
Sudo yuM ialjoti Jn 2edhod
Sudo pt In nt L uburtu.

Pat80s0
pautge bbrvton - Sudo Mum Inslal Jekins-holoest
Jenkin bpenm soto port Senver th puloic Tp 9ien
Foe possd Cop palh in paa and Cat That in lInu
paSsond wil be displayed Cop h passwndand pale
Iken Ciuk Inst llugs eed pugins l09in to Jerkeq:
Coeade a JabandConpiler Cpl Job

Jtnkins dashboaad
cick om n i
Fne ss namaand prqje na wa a

Llet Re AGu prajeu cdhclk on o


a Coni quua page Enl dencaptim
lhen tn he Aoe page undev souaa od anagemen
sdeet qB poáta t t kbua dide om o

EM o ckon build no

Tn ockend ceaves
Run Cod yar kbljmkir woleApo
lbe preest
Pun s i b Coreade 0 server wil
Pun

Vorb1etins
Jens t o pasth CdCd
ToChageens Dat
Sudo vietelAysConigenkni

ToChang Jekn pal

Sudo vtlte 2gsm Jnting


Lin lenbin and dhub war sSH ey

G o to ec inclan& ond genezete gen unnin


Co mond Sh- key jen

2
Cd [Link] lde ond Coppublc k n

3
to qt hub epo sith you(oant t nk
Then go to epo Aeltg

CC dpley keys Add'depla kys Past e L


ey C ck on Add a

ho t Po-nstan d bSsh (opprvata tey


6 ao To enkins Manage Jenkin cl:ckm_ tea
AddAdenhtals.

7 Choose gsh Cdeananme


Give Oseamame- Under vati e
d: U om Erday diaTeH Past prived ke
d:u o Createa ob Under AOu7 la Cod |Manage
sdet gt past t Ah url on ths
Undew Crededhid zded privat ka clck Seve
Com pil
CrTo and

Ceal a-Alzps as wua


c ck nm build Aded Exeuti sll
I Exelive aM op4 e path a kle Ro
Seaverd8 backencd e c
Enev Maka 8are
Cckon buld now
I backand seaver C. ese lewill bz genuaid io
he LoApa discut

To Chtk loq 7 upud o h qoto Console Dipu

Build T gaexd

:Bld At her 0oe bult Lba optim alt ne


hext
it wil riq4
h lonapleled and utLe
Apetisd
mgce he het Jo
We Aeled unslabG ioptim i
even e l lo unSucCe

Tn th ophm We lan rge buld


2Buld Peatodily Ainnla o nlabb
Wat
based mdpeued ime
aindiolly ad inThac
3 PollsCM Jt 6&nmlar to buill
t g4e ttebuld bnsed on 1 Comi
Bhi
Aatifed
Fores fhe a n Coniut in t
huald Jill i9se
SourCe Code ManagewMed:

T T hú willselut ta git hub aeposiBoy ondapk


ual coho t will Pull tholes tin tepo and (zeat i
bon ak spue 9 tkeouraCod io aheody preeat it
Lwill y pul ta Chonga oncl updalz
Buitd Favin nuend

Delte wotspa belore build zloda


It wi delete to olcspae befox e bud klaati
t will rebuild om ACTatoh

Use etad et le
In ho opim de Can odd les or eil
2 Abort he uld t stue
L thi bptim e Can Aet fe me The
sut or 4peekd tim buld Lill, ocbast bud b
4 Addim mpL Hp wueh
ne al Cna Ma
has taken to exete Ond aklach
fo Congale audpad
MASTEP SLAVE

Tt Usedtodshibud Load ta daed Aevea Ond


oulso run pe hc n epehtsetyr

MASTEQ SGNEINS 1 2uuning


Called S masle

SLAVE Save bn ch we un i n in t
LJenkins wl u t be tistalld

Cram Malaare
Go do Manage Jutins
2 Cick m anase oder and Cloud.
Ck o9u Mew woda Cyve h o me o wods
Ckck on permouendAget
ConquePogs Dasaiphim i be given
Nawsev R L Auodd be Apeu ieo
Rwolo rorii duy owee2-user
Lauuch Via Ash Eles IP oslave Aerver
Coedaudi ns Add Jentin2 2Aay wername and

For Ssh Pemkey


h
Tnstde Add Tenkin J t ind Ssh Usernd me wí pnmka
2 Entev USe-noma L2-8
deGph6o Give SomelGing
Enlan ditedhPast Pem y Add.
8lave
Sleps to Acire 0 un ob n

Te Creadingslare n ed.
m 6a
0ofu c b u thhao o un
2
Cik m Cankqu Jn rst Aetim
eledTeacolatve thi roed lan be7u
hOneo slave tr nod
Sove
2cckn l d now
LAREL loTun ankin oto on availablk Seatre

&lap toAlap LAREL


1: o b Manage
Jenki
2 CH on hw node o Auedi eisting noda
Ln LabeEnter name Cc 'on ave.
aoTo ade open Consae Pas under owbel
Entev he sawa
5 no to fe jb
e c uey
Openonqu page Citon
Jns lEad ohod namg Entay labe
6 Save c name
(ast hode b ovallalde ik
ast hode i n6t will Fun On hnt node
ovallodla it coi |l 7un
n
.

Web hoots Th
le_w
a wist 1d 4Merstadaeseuted wwedid medi dy l
Go o Git huh
bded web hoo Pa 6eleat depeiitury
Cic bn Add cut on Ae)lings
Give Jenkin jcb U walbhoo
Go Jnt do in bud6ded push 2et ik Add t
ggai Cheu out
hu hoo hrigg
Dafch build o Ht

I b 0 Crd wrch ned to be deliverd


wiläin w houY Derelopey ill6n
to Cuotey
rtajitedls make will Lopilk only Ckomged.
elang t tBulda
i l lged incrpo-atad
kle ond ehougep
ekouge,
leschime
a
So padh bulld will

Load Lu ld Al uld

Code beae we
kioteCraToh
e Corp:le LourG
delta all inmedtalelo ohilea
&at thd buld we
i qe Lopilen Acafck so t
So notall len
tate aAore n e

Buld- D-ploywerdTet
ExplainCT/CD Build pipeline

delajper Eam pashea Lode to the hub,


As Aoonas hou htee stages
hrggeedJ+
denkins pipedine jab lIlqet
Buld Deploy Cd Tes1 Aaq thAOux Coda m ghub
k T Build Alageit pull buld slag b ucCe
genezad Linaay onc fho
Lomplle i t and
t Laillun deploy Aage
In D-play d build ilqat deployed o dekined
i
and bun BYTbnt BvT b AuCuss
A Savey shod neev break)
AlageEait ntimal e o
i4g fd
staged 2aun B1 CaSeAikeo by lzzhing
n fet
t lailuàe itwill be Jate
he r e heve are lay
h Ihlkgkat im
ine r. Eam 5ereIre ae Aa
Lare hfex
1sSu we will lake ln
2lumtr
mb Tle brn
r
Te t
dor)Agi bl m dn t p 4)
( ud
B2auching
[Link]

be Creatid uskiplk 1 Ransh


Lrauch Can
We Crral bronehesor-eleane

Developunet w beqotne levedopme branc


Czeale rdease
Da Cade n &ead r 1 tTelease, we
bonclho deulopwesd braneh we maka eloae hn
eLase rauck
3 nalamuo denhopest wil be qolnq on delelopnt
hrauoa
rcn d eleose bnc T Code lh ead fo
d elhaseBene l Cretbranch 1delese
le Meee elease handh p deelopwtet branch ond Thaa
We Creata laak 2 brand n 2d eae. So ha
lhate ves he 1ueg e hae aun lh st helease Ahold
het Viclbl in ta r elease_and do on.
ta e d t Check loo_on ealhme.
t

Popie
9 aeplica Cexa epo, bt t bor each deavelop
Pall heapuat (Pe)
2Developer sil heauLst o merme Cewhal zeb
ono daswedoper Cpld hs Wo h
will aitepD
Op roverS 0Y eNiesy wil ÄeJiw P2
(souata Code
hen Merge o Cenhra n0 opprovey eiut pR
eha per has o &u 6n tha Ssu and
9e nalse
SoNA CUBE

1 tio woed f dhee quaktyosourta Code alty


SouaG Code AD tran o] heibConstderc

q,ualtyb yood. 80ua- Cod


Weu unbano tubeoChekq uad:
Dna build b Succes
JFROG ARTIFACTD2y 2Used b stox biro ies

p Jentins Jo bs Ron one Joo t nete

E n l e y J o b hawe

nd We l be having o bp-tion Capao CEtk |


7 hal and enley e a a namaoM Lich we heed Co4

Jeneins Backup LTuin Racup Plgin

9reate Na-depo l 9thub


lone Clone hal Cearo epo op in al
/vor Lb Jenkinso awral Tepo

2 G i t odd and Git (omt


Git Push fo Ceuwtral tepo

Inlenne harewiHo &hell gipt ho tala


I
will Tato bauta
Jiskin baakp,astosaially Sapt
/Veo bentingand stnx backupin cpea
git aepoktry
hav schedudd thsSapt o un elecla
This h
uedfo 19-n0 dirthy
ditor
Ceradtep
or
D
r pali'ng la 9thub.t
i q tgnot
AddAloo diaekay inside.
gitgit atatsTo chesk lu
lu diruoy is
dis
insid9ii 1onox
2gil add git nex
Cam henpusho 9i1 huh

DL eu tnty Con2auia wllpeleaseAppiotn


Bey WeehO
Eve2d weuor
3 P0 d eek q
4 ve 4h eek heedatnds Laparoje a
Copan
Wlhed h your Aariat dutad om
Cur sprid dluuahm h 1weck
on In a WdL
Plugin Means [Link]-
ilhsa oppkCachim
yp Plginin Jentios
1: pshr eawOnd douTn SreowM
Pugin
Patonleded Pkgin
GRr Mau Puon
5 SdeniunPlgin
hrito dor Phagin
/uad gste
Bl OCan Pugn
ThnLackup Phon
wpsteo and douon Shrewn Plugin I i wedto

8 bbs One af fha 6toe and aso pull


DulpuloOne j b To Anthev

[Link] Pugin The Phugio i aoedl o Pass daloa


Inlo enkin ob
0ona u trignev deplogewmedub will wait s
InpuiIhere in wl nle build nunber and 1P adaress
inkre uild has t e Ceployed.
neozwanPgn woe These Plugin uheuAeaver o
We
Jeneins Cashed and eheed to un m angl
ea Verw meuin hai_ea ver 1p inqenarn plugin:

Ai aeom Pmoin n iacky a hepasutoy Mang4s


hol Xore the builds, SouaG Code Ao fhd tE Can ba
ed in tbe pa0jedk
J'FRO 6 ifackor b uued

Matia bued Seuaty ho do you kesa dotins


We Use Matris based2euat paovid panasin
and add use

Slap
2no do Manoga Jenins
Cuck 6n Conquse 6lbba AeuaL
Unde [Link] dhek Mactr' boaed Seci
EnviaonMenla Vaales
Hou to &d

:Go to Manage denke


2 bo o Conua Arten
360 h lbol ropaliea
chce [Link] raoiables
S
anve nae aiables end esley Vaue
chokon Ald

Ho Lend email Noticshm


We We need
w_Conhgan MTP Aemver

To Lerd o rthen
no t job
Under build Ahn select Emas
Eit Enaa Adares nt;ádin
Qualrty Grate It b wually Ueed
Wealle meet fhe hewssaly to check tu Code
Met Alaqe Llerio
(leriQ bb Move
Move bb
Jenkins Pipeline

TeninsPLpelie

T a in Jenkins ohene all h


The a b doa rough oda.
Contqugaim
Groovy e langua s wed Ao Li p-peina J
3 he Moain ppalina i wa-f in a le alled Jenkinsile

lwo Type o pipeltne

Scrpd pipeliue
T+ ha fraditima wa o wing groo4 Lapl
MostMost a9 The Congsahin skord Le dos neuel
AL TRapt b deined 1d kod Lloc
Mod

Declaraivppelle
JE a ne ay wing qzoov dechaatile
Most o fhe opions la Pardenedi ndeclaratiu
Ppelie
AL Code djned inid pipelas 13lo
pipdina

Jen kinsle h o l ewhere pieine Canp oil e


N le Tun ppe ab wi l be doned in
QrooU a u a a
Ho todekine a ppeline eb
a n Can datctlywri the ppalinaSipt tnside
ob
wCan wi t Aapt ina le (alledJenis he
and lAou it eoea SCM

n Agentb med deine fh exLuim ape


Ageat b wed fo distrubudk woload
dat Alegpa
Eàch Eoch Alag wil be Qsigned iTh_a xèuda aec
agert looquladn
LAgut bn be dened [Link] and lay levl

Ar uns
apine peinaah m any available exedan
hio b abpliiud a fhe ppelina
whe Tain leve ue
nedto no a9tat od evy eel
Labe
Sage
Botb d age Gnd pipene leve we Can ue
fhaeAge
) hw dene agsat ot evely
evel sao level
saoe leved
Iha fo
deia09u honeodPpeline Pene le lev
DeclaoH va Ppel:e

Dyneline [Link] RasiC keleto


Ppekine
0-ent any
Aläges
Ae'Build)5
alp Sh1

kp Alep 5
echo" Thin b Buld sage

daqeDEpLoY)
slaps
Ah

slaepS
edho Thin Deploy 30g

slage TEST')
sleps 1
h
Alp5
echo Thi i sag
Fo ent non2

Pipeline
ag em none

slag
sags('Do1LN)
agent Labealavery
step
echo Ths RUILD Alage

Staqe (DEPLOY)
agent labelslave'
slap
echo Thih b Deploj Slage

In der To oun all slãg in Matl


hgent Label iMast Gaive od ppeline 1eve
Paoall
PR
Ppellne 2 Bu:ld
Ogent a 3 Unitest
Al i (Juni,Adenum)
alage TEST 4 ual:ty onalysis(ra)
Darnlld S Av ct (rrD
Alage ('TEST I") Dep loy o tet-ToMct
slopt UAT (vseracagtae test).
"echo th TEST Prod

slage iTEST2)
Aeps
echo thi tuat 24

TeST
Tutl
-TeaB 2
Mact-y-&lo ve i auu

Swdo apt updele


2. Sudo ptwolel-yare
Sudo opt iial ch
4
ldeltnt dlsh start , p e Sauda

o wee dto Crea a e r ad Cneaa aget w fut


we
Usevadd -m d /home/tinkin ekin (u U
ttan -
Swle TL Sus amd Aup Llos

sshe A.
Is .ssh
Cd ssh [id-ssq
Prinde k to pat nt
Cat
lsshid-sepu auchsi ed-

(Ghageiim ere kt wena lot.d)

TRa Zouez Sudo mdoti C su-Hueznn Aia Ela


in datcH p Asta T oe

Shdo ime dole cH sutk


m2Dus UTC

You might also like