1 of 15

Building System & CI/CD

The lifecycle of a piece of code

DevOps/Compiling/Integ Test/CI/CD/Pipeline/In-place vs. Blue-Green/etc.

2 of 15

Deployment of the first web application

App:�Write code�Copy Code to a http server�Restart the server

DB:�Update Schema/Table

Limitation?

Downtime, Unstable, Error-prone, etc

3 of 15

Why CI/CD

Rapid software changes

Maintain system stability & security

Archive above with 0 tolerance for outages

4 of 15

What are CI, CD

Continuous Integration�Regularly merge code & auto build + testing → good quality and ready to release

Continuous Delivery�After CI, deploy code changes to test/prod env; auto or half-auto

Continuous Deployment�Revisions are deployed to prod env. automatically.

Changes are ready for prod. VS. Changes are deployed into prod automatically.

5 of 15

Industry standard - when it comes to scale

Code Repo

Auto merge & build

Test Env

Prod Env1

Stage

Every company has its own way of DevOps life cycle.

Dev & unit test

Goal:

  • Automate the Software Release Process
  • Improve Developer Productivity
  • Improve Code Quality
  • Deliver Updates Faster

Roll Back:�Changes can be vetted at any stage, followed by Roll back

6 of 15

Roll Back

Roll Back policy is different from stage to stage.

Criteria for Roll-back� Monitoring Alarm� Monitoring Metrics� Run scripts

Action� Redeploy last successful build� Cut a ticket

7 of 15

Dev & Unit test

IDEs� Homemade & public

Dependency Management

Java - Ant, Maven, Gradle; C/C++ - Make; JS - Grunt; Rake, Webpack

Building

CodeGen, Compiler, Interpreter � Output: Binary, image, doc, etc

Local Unit Test

Open Question: �- Does your org. have its own IDE/Plug-in?�- Does your org. have its own build system? What are the key components?

Code Repo

Auto merge & build

Test Env

Prod Env1

Stage

Dev & unit test

8 of 15

CI: Code Repo & Auto merge/build

  • SCM: SVN, Git, CodeCommit
  • Unit Test, Static Scan, Style Check,pre-submit
  • Trigger CI tools like Jenkins to build the code, pass SHA
  • Output Artifacts, binary, images, doc:

Code Repo

Auto merge & build

Test Env

Prod Env1

Stage

Dev & unit test

9 of 15

Continuous Delivery

  • Integration Test/API Test/Load Test
  • Function Test
  • Baking/UAT�Tools: selenium,
  • Open Question:�Key functions of a test Tool?�How to handle DB?

Other:�IaC�Serverless/Lambda

Code Repo

Auto merge & build

Test Env

Prod Env1

Stage

Dev & unit test

10 of 15

CI/CD testing pyramid

11 of 15

Deployment to Production

  • In-place & Blue-Green�
  • Deploy with confidence
  • Waves - small regions vs. big regions
  • Containers?

Code Repo

Auto merge & build

Test Env

Prod Env1

Stage

Dev & unit test

12 of 15

Dynamic/centralized Configuration

Implementation

Frameworks:

Key Functions:

Status

A/B Testing:

13 of 15

Code deprecation

Function

API

Service

14 of 15

Other streamlines

AI/ML?

15 of 15

Resources