Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 3.33 KB

branching-strategy-and-ci-cd.md

File metadata and controls

48 lines (39 loc) · 3.33 KB

Branching Strategy and CI/CD

  1. General information
  2. Branching strategy
  3. CI CD Configuration
  4. CI CD Workflows

General information

Project follows GitHub flow branching strategy. Project includes CI/CD pipeline to manage automate development steps reproduce and Application deployment. CI/CD processes are handled by CircleCI.

Branching strategy

GitHub flow is relatively lightweight and simple workflow. This strategy (unlike, for example, GitFlow) has simple branches setup: main(master) (which reflects current production state) and features \ bugfixs (which handle upcoming changes), NO additional branches like release presented.

⚠️Warn:main(master) branch should include only ready-to-deploy state.

GitHub flow git model

Such strategy is friendly for handling Continuos Integration and Continuos Delivery support.

CI CD configuration

CI/CD Configuuration could be found here: /.circleci/config.yml. The following Jobs are configured:

  • install-packages - installing NPM packages. Uses cache based on package-lock.json file checksum;
  • lint - linting of Source Code (ESLint + Stylelint);
  • test-tsc - checking TypeScript files (/tsconfig.json);

    ⚠️Warn: This is a vital step. TypeScript transpilation is handled by Babel, so type checking are NOT presented during that time.

  • test-unit-integration - executing Unit/Integration tests (Jest+RTL, /config/test/jest.config.js);
  • test-unit-integration-with-reports - executing Unit/Integration tests + preparing of Reports artifacts (Results + Coverage);
  • test-sca - executing Source Code for vulnerabilities;

    💡 Note: Snyk secrets environment variable set up on CircleCI side.

  • test-performance - executing Performance tests (LightHouse, /config/test/lighthouse.config.js);
  • build-app - building Application;
  • deploy-app - deploying Application (AWS S3 hosting);

    💡 Note: AWS secrets environment variables set up on CircleCI side.

  • build-components-library - building Application's Components library (StoryBook, /config/storybook/);
  • deploy-app - deploying Application (AWS S3 hosting);

    💡 Note: AWS secrets environment variables set up on CircleCI side.

CI CD Workflows

There are two workflows available: Common (for feature branches) and Commitment (for main branch).

Common (feature) workflow

GitHub flow git model

Commitment (main) workflow

GitHub flow git model