YAML#

This is a “sub-pipeline” for linting new changes that have been made to YAML files of a specific GitLab project.

Triggers#

All jobs from YAML “sub-pipeline” stages are triggered only on merge requests and only if changes have been made to YAML files. Right now such files are detected by these patterns:

  • **/*.yml.

Jobs overview#

check:yaml:format#

This job executes yamllint only on changed YAML files (not diff, but files) which will diagnose and fix style violations.

ARTIFACTS

Job will generate a simple log file with all found issues.

CONFIG

Configuration file is located at the root of the repository and has .yamllint name.

DEPENDENCIES

Job doesn’t require artifacts from other jobs and has no dependencies from other stages or jobs.

ENVIRONMENT

Name

Necessity

Type

BPROTO_CI_LINTER_TRACE

Optional

Public

BPROTO_CI_MERGE_REQUEST_CHANGED_FILES

Mandatory

Internal

IMAGES

alpine:3.

STAGE

Check stage.

TRIGGERS

Job is triggered only on merge requests when any file from trigger list is changed.

Usage#

In order to use above CI jobs, you need to add the following code to your .gitlab-ci.yml:

include:
  - project: 'bproto/cicd'
    ref: main
    file:
      - '/.gitlab/ci/external/lite.yml'