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
- Create a file
.yamllintrc.yamlto customize the configuration.
---
extends: default
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| allow-failure | Should the pipeline fail if the test fails? | true | boolean |
| config-file | The 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-path | The path of the configuration file. | .yamllint.yaml | string |
| opts | The options to pass to yamllint. | string | |
| path | The path to lint. | . | string |
| rules | The rules that this job depends on. | [{"if":"$CI_PIPELINE_SOURCE == \"schedule\"","when":"never"},{"exists":["**/*.yaml","**/*.yml"],"when":"on_success"},{"when":"never"}] | array |