Skip to main content

Each new commit will trigger the pre-commit integration on the developers workstation and inside the pipeline. Meaning you run the same hooks before a commit and inside a pipeline.

See a list of available hooks.

Usage

  • Follow the local install guide
  • Create GitLab pipeline file .gitlab-ci.yml:
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/pre-commit@stable

Run stand alone before the commit.

pre-commit run --all-files

Inputs

NameDescriptionDefaultType
------------
config-filePath to the pre-commit configuration file.pre-commit-config.yamlstring
needsThe jobs that this job depends on.[]array
optsExtra opts to pass to pre-commit such as --all-files--all-filesstring
rulesThe jobs that this job depends on.[{"if":"$CI_PIPELINE_SOURCE == \"schedule\"","when":"never"},{"when":"on_success"}]array
stageThe stage to run the job in.prestring
tagsThe runners that this job depends on.[]array