VERSIONING

A mas-front approach

MASMOVIL TECHNOLOGY

PACKAGE VERSION

BEHIND THE SCENES

RUNTIME CONFIG

RE-THINK RE-LEASES

MONOREPO VERSION

PACKAGE VERSION

1.2.3-rc.0

MAYOR

MINOR

PATCH

PRE-RELEASE

SEMANTIC VERSION

BEHIND THE SCENES

Actual Approach

install

test

SOURCE CODE

  • Original code in several languages (HTML, CSS, JS, TS, spec-features).
  • Dependencies installation.
  • Run tests and linters.

Actual Approach

install

test

build

env

env

BUILD ARTIFACT

  • Production-ready bundled application
  • Transpile, optimize, concatenate, minify, chunks, tree shaking, cache hash, ...

Actual Approach

install

test

build

docker

env

DOCKER IMAGE

  • Application as a portable container
  • Provide application runtime and virtualization

Actual Approach

install

test

build

docker

helm

env

HELM PACKAGE

  • Application as a portable cloud-native application
  • Provide infrastructure resources definition

Actual Approach

install

test

build

docker

helm

deploy

env

DEPLOY TO CLUSTER

  • Deploy helm package to cluster

env

Wich config?

!

!!!

RUNTIME CONFIG

Build-time config

install

test

build

docker

helm

deploy

env

Runtime-config

install

test

build

docker

helm

deploy

env

Shorter pipelines => Faster iterations

NODE_ENV

!=

APP_ENV

0
 Advanced issue found
 

NODE_ENV

Sets runtime to prod mode

  • No devtools
  • No test/mock data
  • No HRM
  • Performance optimizations

Sets application environment config:

  • Endpoints
  • Default FeatureFlags
  • Default app settings

APP _ENV

RE-THINK RE-LEASES

build

docker

helm

deploy

sta

1.2.3-rc.0

sta

build

docker

helm

deploy

prod

1.2.3

prod

Tag format determines config and cluster

Forces to replay pipeline

Release Promotion (Before)

helm

deploy

1.2.3

dev

Same Helm package to several clusters

Faster deploys|rollbacks

deploy

sta

deploy

prod

Release Promotion (After)

MONOREPO VERSIONING

feat/branch

master

hotfix/branch

  • Independent package version
  • Only applications versions, not libraries (common)
  • master autoversion
  • Short-life branches
    • PR ASAP
  • master ~= prod-ready
  • Powered by Feature Flags

MAS-FRONT VERSIONING

a.0

b.0

c.0

a.1-rc.0

a.1-rc.1

a.1

b.0

c.0

a.1-rc.2

b.1-rc.0

a.2-rc.0

b.1-rc.1

a.2

b.1

c.0

autoversion!

autoversion!

PACKAGE VERSION

BEHIND THE SCENES

RUNTIME CONFIG

RE-THINK RE-LEASES

MONOREPO VERSION

Q&A

@anthanh | #frontend-general | #mas-front

Mas-Front Versioning

By Anthanh

Mas-Front Versioning

Front monorepo versioning proposal

  • 790