diff options
Diffstat (limited to 'docs/cli-examples.rst')
| -rw-r--r-- | docs/cli-examples.rst | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/cli-examples.rst b/docs/cli-examples.rst index 5f4e0bc..7f21f03 100644 --- a/docs/cli-examples.rst +++ b/docs/cli-examples.rst @@ -6,6 +6,48 @@ CLI examples For a complete list of objects and actions available, see :doc:`/cli-objects`. +CI Lint +------- + +Lint a CI YAML configuration from a string: + +.. note:: + + To see output, you will need to use the ``-v``/``--verbose`` flag. + +.. code-block:: console + + $ gitlab --verbose ci-lint create --content \ + "--- + test: + script: + - echo hello + " + +Lint a CI YAML configuration from a file (see :ref:`cli_from_files`): + +.. code-block:: console + + $ gitlab --verbose ci-lint create --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 + +Lint a project's current CI YAML configuration: + +.. code-block:: console + + $ gitlab --verbose project-ci-lint get --project-id group/my-project + +Lint a project's current CI YAML configuration on a specific branch: + +.. code-block:: console + + $ gitlab --verbose project-ci-lint get --project-id group/my-project --ref my-branch + Projects -------- |
