frontend-commons/README.md

4.6 KiB

Frontend Commons

This repository contains consolidated boilerplates, CI/CD pipelines, and utilities for setting up frontend projects.

CI/CD

GitHub (forgejo) pipelines and other CI/CD utilities for the frontends Phoenix Technologies maintains. Its purpose is to provide unified and consistent CI/CD workflows for all recent frontend projects developed and operated within our company, ensuring alignment, quality, and maintainability across setups.

.Github Workflows: Build and push containers

Containers are built using dedicated Dockerfiles located in the /docker directory within each project repository. After the build, the images are pushed to the registry.

Build Standalone

A standard single-repository project with a package.json file located at the root, managing dependencies for the entire project.

Vars (inherited)
Key Description Required
IMAGE_PATH Image base path
Inputs
Key Description Required
PACKAGE_WRITER_USERNAME User name of the package writer
Secrets
Key Description Required
PACKAGE_WRITE_TOKEN Accesstoken of the package writer
FONTAWESOME_PACKAGE_TOKEN Fontawesome Pro library token (Only needed if FA in use )

Build Monorepo

A monorepo project based on Turborepo, with individual projects located under the /apps/<PROJECT_ID> directory.

Vars (inherited)
Key Description Required
IMAGE_BASE_PATH Image base path
TURBO_TEAM Turbo repo team ID
TURBO_API Turbo repo api url
Inputs
Key Description Required
PACKAGE_WRITER_USERNAME User name of the package writer
PROJECT_ID ID of the projcet
Secrets
Key Description Required
PACKAGE_WRITE_TOKEN Access token of the package writer
TURBO_TOKEN Access token for turbo cache
FONTAWESOME_PACKAGE_TOKEN Fontawesome Pro library token (Only if fa in use )

.Github Workflows: Linting, type checking, code analyzis, dependency tracking

Lint

Linting, type checking, sonarqube, dependency tracking, any testing

Vars (inherited)
Key Description Required
TURBO_TEAM Turbo repo team ID (only applicable on monorepos)
TURBO_API Turbo repo api url (only applicable on monorepos)
SONAR_HOST_URL Sonarqube Host (required if sonarqube is enabled)
Inputs
Key Description Required
SONARQUBE_ENABLED Send source to sonarqube for code analysis; default: false
TESTS_ENABLED Enable test suites; default: false
SETUP_REPO_SCRIPT Script which runs after install for setting up the repo; default: yarn run setup)
Secrets
Key Description Required
TURBO_TOKEN Access token for turbo cache (only applicable on monorepos)
FONTAWESOME_PACKAGE_TOKEN Fontawesome Pro library token (Only needed if FA in use )
SONAR_TOKEN Sonarqube access token (required if sonarqube is enabled)

Authors