In interviews for a position that involves understanding DevOps, I like to ask candidates this question (and sometimes they also ask me):
What do you think the ideal pipeline from commit to production should be? / Describe the ideal CI / CD / etc
. , CI/CD .
?
, .
, .
, "", . , ( ) , . , , " โ " DevOps.
. , . : Jira production. gitflow, gitlabFlow, githubFlow.
, - CI, , ?
CI?
;
;
;
;
;
Merge;
MR code review.
.
Code scanning
โ .
โ Senior/Lead Backend Developer. , // . , .
:
;
;
.
.
, git push
.
gitlab-ci
stages:
- code-scanning
.code-scanning:
only: [pushes]
stage: code-scanning
Linters
โ ! . " ".
โ .
|
|
---|---|
eslint |
JavaScript |
pylint |
Python |
golint |
Golang |
hadolint |
Dockerfile |
kubeval |
Kubernetes manifest |
shellcheck |
Bash |
gixy |
nginx config |
etc |
|
Code Quality
code quality
โ , ML- : , , ., code security
.
Code Security
, code security
. :
//.
C .
, , . "" production ,
git
. , ,vault
,git
, .
Code Coverage
, , code coverage
.
Unit test
code quality
, .
Build
artifacts/packages/images .. , .
:
, .
|
|
---|---|
docker build |
. |
|
Moby . , |
|
Google, , -. |
|
'. stapel. All-in-one: , . |
|
Open Container Initiative, Podman. |
etc |
|
, โ .
Scan package
/ . . registry .
|
|
|
---|---|---|
|
Docker Registry, ChartMuseum, Robot-users. |
Free |
|
Docker. |
Free pro |
|
, . |
Free pro |
etc |
|
|
Deploy
.
rolling โ ;
recreate โ , production;
blue/green โ 90% production ;
canary โ 99% production .
Stateful
, stage production, production - , stateful . , , / . stage/pre-production .
/ .
|
|
---|---|
|
Docker-compose helm. . |
|
. |
|
" GitOps". |
|
. |
|
, . |
etc |
|
helmwav' GitHub. helmwave.
Integration testing
Performance testing (load/stress testing)
stage/pre-production . , , production.
,
|
|
---|---|
wrk |
. . |
|
C--JavaScript! AutoDevOps. |
Artillery.io |
JS. k6 |
|
OldSchool. |
|
. |
etc |
|
,
|
|
---|---|
sitespeed.io |
: coach, browserTime, compare, PageXray. |
|
Google. , . . , . |
etc |
|
Code Review / Approved
Merge Request. pipeline , , c.
/:
QA;
Security;
Tech leads;
Release managers;
Maintainers;
DevOps;
etc.
, MR , MR:
production;
QA release ;
DevOps' , : helm-charts / pipeline / / etc.
Developing flow
, , -โ. -, gitflow, gitlabFlow, githubFlow .
, โ . , gitflow . GithubFlow . gitlabFlow , , - , feature-.
, :
Gitflow: feature -> develop -> release-vX.X.X -> master (aka main) ->
tag
;
GitHubFlow: branch -> master (aka main);
GitLabFlow: environmental branches.
TL;DR
_
Feature-
Pre-Production -> Production
P.S.
- , , , , โ update.
. ?
.