Build Essential
contains a list of packages which are considered essential for building packages in ci platform
Why
Our Reference Architecture introduces a set of standards around linting, code quality, testing are more ...
Those standards are upheld using a variety of tools, however, projects need to add these individual tools as dependencies, which introduces a number of challanges:
CI Environment
CI tests have to run npm install
on every project, and the bigger the dependency list, the longer those runs take.
As part of moving to separate CI & CD processes, we have the opportunity to pre-load some of the most common project dependencies into a Docker container
Local Development
For developers working across multipl projects, having to install the same dependencies over and over for every project adds a layer of inconsistency that can be resolved with global dependencies
What
-
npm package: released as an open source package under @telus
scope in npm, the package.json
file contains a number of pre-selected common dependencies, (mainly used for linting)
Note: the dependencies are marked as peerDependencies
to enable some limitations around eslint
and others in global usage.
-
Docker Container: a Dockerfile
uses the package above as basis for creating a container used in CI jobs
Packages
-
Configration:
@telus/eslint-config
- Shared ESLint Config@telus/remark-preset-lint-markdown
- Shared Remark Config@telus/semantic-release-config
- Shared Semantic Release Config
-
Tools:
editorconfig-checker
- EditorConfig validatoreslint
- ESLint Validatorremark-cli
- Remark is a markdown validatorsemantic-release
Semantic Release is a fully automated version management and package publishing toolupdated
- Updated ensures you have the latest dependencies
-
Utilities:
How
Install Locally
npm install --global @telus/build-essential
Note: the postinstall
step will attempt to install more packages globally, you might need to run with sudo
depending on your local npm
setup
Use in your CI
Use the Docker Container to run your lint steps as per the example provided in this project's cirlce.yml
Github: @telus •
Twitter: @telusdigital