-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsession-73.txt
More file actions
91 lines (66 loc) · 2.54 KB
/
Copy pathsession-73.txt
File metadata and controls
91 lines (66 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
merge vs rebase
branching strategy
* Git flow
* github flow/feature branching strategy
reset, revert
squash/interactive-rebase
stash
cherry-pick
============
when you want only a certain commit/changes in another branch we can go for cherry-pick.
C1 C2 C3 C4
C2-C1 = a particular feature
git cherry-pick C2
a hot fix came, fixed it in hot-fix branch...directly deployed into PROD. you can get that code as cherry-pick into release branch
CI(Continous Integration)
=========================
Image/AMI build
Infra creation
commands to deploy k8 applications
application is an artifact
build the application
test the application
scan the code
deploy the application
3 months sprint, once everyone says development completed then they go for deployment in DEV
shift-left
===========
instead of testing and scanning the application after deployment can introduce lot of issues, fixing them takes more cycles again and again. but we can shift this before deployment
functional defects -> functionality is not working as expected
build errors -> you can't build image/ami
deployment errors ->
it is a process of integrating code into artifact. we can trigger this CI after every commit into git...we can also follow shift-left, we can do testing and scanning the code before build..
Jenkins and GitHub actions
===========================
1. Complete control with us, We must depend on GitHub
2. We need to main extra CI server and take care of upgrade, patching, etc...No need of extra server for GitHub. We must use GitHub as coding platform.
logs, visualisation, rbac, diff platforms testing, etc..
plugins add extra capabilities to jenkins
CI
==
sudo curl -o /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/rpm-stable/jenkins.repo
freestyle job
=============
code directly in jenkins
accidental changes
cant easily track who did that changes
tough to restore
no version control
pipeline
========
we can keep the code in git
declarative vs scripted pipeline
==================================
scripted -> old pipeline, groovy syntax. before pipeline it can't check for errors. at run time if error comes it will exit. we have more control to write scripts
declarative -> latest pipline from jenkins 2.0. it allows groovy syntax, but before execution it check for errors
we use a hybrid approach, we have script block in our declarative pipeline to have more control on the stages
Master and Node architecture
============================
pre-build
build
post-build
TRIGGERS
=========
web-hooks
event driven
if someone commits to git repo, we can trigger this pipeline