diff options
| author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-07-09 13:56:33 +0200 |
|---|---|---|
| committer | John Villalovos <john@sodarock.com> | 2022-07-09 08:22:20 -0700 |
| commit | 3b1ede4a27cd730982d4c579437c5c689a8799e5 (patch) | |
| tree | 62889d73ce7a6523ff8036a6006111695fbc2894 /docs/cli-examples.rst | |
| parent | 0daec5fa1428a56a6a927b133613e8b296248167 (diff) | |
| download | gitlab-3b1ede4a27cd730982d4c579437c5c689a8799e5.tar.gz | |
feat: support validating CI lint results
Diffstat (limited to 'docs/cli-examples.rst')
| -rw-r--r-- | docs/cli-examples.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/cli-examples.rst b/docs/cli-examples.rst index 7f21f03..6c4364f 100644 --- a/docs/cli-examples.rst +++ b/docs/cli-examples.rst @@ -15,6 +15,9 @@ Lint a CI YAML configuration from a string: To see output, you will need to use the ``-v``/``--verbose`` flag. + To exit with non-zero on YAML lint failures instead, use the ``validate`` + subcommand shown below. + .. code-block:: console $ gitlab --verbose ci-lint create --content \ @@ -30,12 +33,24 @@ Lint a CI YAML configuration from a file (see :ref:`cli_from_files`): $ gitlab --verbose ci-lint create --content @.gitlab-ci.yml +Validate a CI YAML configuration from a file (lints and exits with non-zero on failure): + +.. code-block:: console + + $ gitlab ci-lint validate --content @.gitlab-ci.yml + Lint a project's CI YAML configuration: .. code-block:: console $ gitlab --verbose project-ci-lint create --project-id group/my-project --content @.gitlab-ci.yml +Validate a project's CI YAML configuration (lints and exits with non-zero on failure): + +.. code-block:: console + + $ gitlab project-ci-lint validate --project-id group/my-project --content @.gitlab-ci.yml + Lint a project's current CI YAML configuration: .. code-block:: console |
