Professional Documents
Culture Documents
&,
@ 0 • ( Slide show I •) lltJ Share
>ols Help
© View only
Background
Cu rre nt Situation:
C2 LKG
- Ju kw aa LKG
tion.
76 repos in github un de r houzz organiza
svc : ov er 10 0 sub mo du les , for diff ere nt language. java, python, go
Within C2
t~ production: 66
Staging: 69
CIC;D concepts
Notif icati on
l clean
J Faile d
'I R~e wI
I I
setu p
Succ eed Stag ing
f conm its~ Style chec k Publ ish
I I
I
I
lcod e B a s e p - ~ - - - _
..o I Build I prod uctio n
I
Unit Test
l 1
othe r relat ed
I Integ ratio n Test ]
code Base
CD PIPELINE
Cl PIPELINE
I
I
.
.
Ho w to ad ap t ou r ne w CIC D flow \\
1. crea te ci-c onfi g.js on file into your ·rep o or mod ule
get hoz exec utab le from aws s3
aws ·s3 cp s3://h ouzz~ packa ges-s tagin g/won derho uzz/h oz .
exam gle
che ck-i n the ci-co nfig file into your repo and notify productivity team
2. Wai tinQ for noti fica tion from hoz-pipeline in yo'ur specific slack chan
nel.
'1'1 D
(\ (\ Hoz-Pipeline APP 3:01 PM
Hoz check passed in wonderhouzz master branch wonderhouz_z after commit fbf2878d
~~sbck
kubernetes
CLI - hoit ,
. ,_,
Other services
Pangolia~
typhoon.
Tsdb.
- - - • . . t i Wonder ,:•. Jenkins
Houzz . scripts 1 Emails
l,wvice , I
aws
-~..,
Jenldna
'
..
'I
ID Home - Houzz ~, Git 0 test pipelines M lnbox (348) - yash ... 0 Groovy pipelines .{3 Dashboarc
Project Description
To increase the productivity of development, test and release, we are providing a standardized continuous
integration flow at Ho~z for each service. That means, each product must follow the same development
flow from compile, stylecheck, build, test, and release. We aim to provide a centralized solution to
support different products with different languages, a solution that can be applied to different type of
project, whether it is a library, executables, or deployable services.
Overview-
WhatisCICD
Continuous Integration and Continuous Deployment. Any commit(s) to a repo will go through a series of
checks before publishing. any code passed_ the CI steps will automatically _be deployed to staging
environment for further testing
Clean publish
Setup
StyleCheck
Build test result
Post Commit trigger 1---~ analyzer ,____.i
arser
Unit Test
Integration
notification
For each service, each commit or batch of commits to its repo triggers the standardized flow to verify the
changes in the commits not introducing issues, bugs, hence to generate a package for next stage -
deployment.
project or submodule that want to adapt the CICD flow only need to ptovide a config file with the
following entry. (ref: How to enable CICD)
{
"nam.e": "product-name",
''group": ''jukwaa@houzz.com or slack channel",
"author"~ [''kane", ·,
"Roberto"
"Karthik"
'
J
"description": "",
"main": "index.js",
"dockerURL": ''url to docker address",
''CI": { • • .
"clean": "gulp clean", •
"setup": "npm install --ignore-scripts"',·
"build": '"', .
"stylecheck ": "eslint ./src --quiet --cache --ext=.js,.jsx,.json",
"unit-test'': "jest --coverage -json --outputFile=.jest-test-results.json",
"integration--test0 : "jest --coverage --j son --o~utFile=.jest-test-results.json",
h
"Publish": [{
"auto_on": true,
"target:": "stghouzz",
"repository":, u ECR", .
"script": "$GI1 _ROOT/build/src/staging/mpa/build-c~.sh"
J
},
{
"auto_on": false,,
"target:'': "houµ2'', 1/
"repository'': "!ECR",
"script": "$GIT_~OO'l'~uil~src/staging/mpa/build-ci.shtt
}],
"deploy": [ {
''auto_on": true,
"target": "stghouzz".
"type": "k8s". .
"scriptu: ''push_config.sh" . . . .. . 11
1gns. yaml
"config_file": "$GIT_ ROOT /build/src/stagtng/mpa/rol>acampa1gns/mpa-campa
},
{
"auto"'Ton"; false,
"target": '"hou,.z2",
'I "type"; ''kijs", . "
"confjg_fileH :"SGlT_ROOT/build/src/houzz2/mpa/mpacampaigns/mpa-campaigns. yam I
L
System Archit ecture
., / CLI- hoz
I Other
services:
Pangolia,
-
Wonder Jenkins typhoon,
Houzz scri ts_ . Tsdb,
Emails
-
=
/se~ I
Q··
slack ----- -
Jenkins
Hoz tool
We created HOZ tool which picks up ci-config.json and execute all necessary steps. This is the essential
tool for out CICD flow.
It has 2 prerequisites:
D
... Unit.int lest
ci-config .json
-~
Refer ences
docum entati on
Code Location
Pipeline flows, services, and command are in the repo:
https://github.com/HouzzJwonderhouzz.git
A snapshot:
w ...
"C\ Hoz-Pipellne Ntf) 1:57 PM
'V~ Cl
Hoz check passed in jukwaa Release branch after commit Oe799226
Jenkins Job link
Cl Hoz check passed in jukwaa master branch after commit 200889e6
Jenkins Job link
Hoz-Plpellne APP 2:03 PM
! @xutian Hoz check failed in jukwaa mast~r branch after commit 7053~ 9a3
int-test:
link:https://jenkins.stghouzz.com/job/PostCommit_Jukwaa_master/559 /artifact/master/jukwaa/./ci_
result/int-test.log/*view• /
errors:
{ Error. SyntaxError:
/home/jenkins/workspace/PostCommit_Jukwaa_master/master/jukwaa/apps/notifications/pages/n
· otifications/proSolutionsNotifications.ctx.js: Unterminated string constant (178:3)
at process.fallback
(/home/jenkins/workspace/PostCommit_Jukwaa_master/master/jukwaa/node_modules/async-
listener/index.js:565:15) 'error@context': 0} 'Error: SyntaxError:
/home/jenkins/workspace/PostCommit_Jukwaa_master/master/jukwaa/apps/notifications/pages/n
otiftcations/proSolutionsNotiftcations.ctx.js: Unterminated string constant (178:3)\n at _loop
2. C2SVC modules:
mpacampaigns
mpaserver
Insight
searchmixer
These modules under c2svc mostly been automatically deployed to an k8s instance at staging for
each commits, but of course project owners can always control what their projects to do by
editing the ci-config.json entry.
* :.1
I eo • t. ---..... • -• • I J _,, .......... , ___1 1 0 , . , - .,_::::,• • - - ~ - " - - - - .... , ....... - ·• • - · . , _ _ -- -· O I O ..... : , , --- ll~o,
rJ Hoz check passed in c2sv<; master branch src/java/mpaserver after commit c388a0d4
Jenkins Job link
~..,;;;.;.~~L,.:---_-_-....- A . - r , - . - . - . - . - - - - - - _ _ _ : _ - - ~ - - , - - . , . . _ ~ : _ _ - - - - - - - - - - - - - new messages