Package Exports
- @toptal/davinci-ci
- @toptal/davinci-ci/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@toptal/davinci-ci) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@toptal/davinci-ci
Holds Jenkins jobs definitions and Docker files supporting frontend applications.
Demo
Watch this video for a demo of how to set up a davinci-ci Jenkins jobs for a project or check the How to start a new application guide.
Installation
Use it by installing yarn add @toptal/davinci
in your project.
Usage
Commands
davinci ci danger
- checks if the PR title and and commit messages comply with Toptal's standardsdavinci ci danger --conventionalCommits
- checks if the PR title and and commit messages comply with ConventionalCommits
To check commit message quality locally just add --local
argument
davinci ci danger --local
Using husky, you can check the commit message before pushing files changes.
"husky": {
"hooks": {
"pre-push": "yarn davinci ci danger --local"
}
},
Configuration
You can specify which scenarios you want to be performed both for PR and master branch updates by creating a davinci.yaml file in the root of your project with the following structure.
(by default each config option is set to false
)
pr:
contract_testing: false
master:
publish_as_package: false
deploy_staging: false
deploy: false
# Customize Slack channel where the notifications will get posted
slack_channel: 'custom-slack-channel'
is_progressive_web_app: true
Alias
In all the commands you can use davinci-ci
directly if needed, instead of davinci ci
. This is not a recommended way to use davinci
, but in very rare cases it might be useful.
Commands you can use in GitHub PRs
@toptal-bot run tests
- to re-run pr-tests
job
@toptal-bot run package:alpha-release
- to run publish-alpha-package
job, which is publishing alpha release of the package to npm (temploy for npm package)
How to setup cypress in CI
In order to enable cypress tests on CI jobs (both pr-tests and master-main) enable it on your project davinci.yaml
file, like in the example below:
pr:
cypress: true
master:
cypress: true
If you have it set as false or if this config is not present in your project davinci.yaml
file, cypress step will be skipped.
IDE Tooling
This package can be used directly in your IDE through these extensions