Skip to main content

This component manages linting of YAML files. By default this component applies a configuration with reasonable settings for software projects.

Usage

Example with one custom setting

  • Create a new pipeline file
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/lint-yaml@stable
---
extends: default

Inputs

NameDescriptionDefaultType
------------
allow-failureShould the pipeline fail if the test fails?trueboolean
config-fileThe contents of the configuration file, if none exists.--- extends: default ignore: - '**/templates/**' - '**/node_modules/**' - 'release/**' rules: indentation: level: warning line-length: level: warning document-start: level: warning new-line-at-end-of-file: level: warning string
config-file-pathThe path of the configuration file..yamllint.yamlstring
optsThe options to pass to yamllint.string
pathThe path to lint..string
rulesThe rules that this job depends on.[{"if":"$CI_PIPELINE_SOURCE == \"schedule\"","when":"never"},{"exists":["**/*.yaml","**/*.yml"],"when":"on_success"},{"when":"never"}]array