diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2022-01-08 23:19:32 +0100 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-01-08 14:32:14 -0800 |
commit | f33c5230cb25c9a41e9f63c0846c1ecba7097ee7 (patch) | |
tree | c9eeffe0552e6d8d9abeb81552f224e7c262836c | |
parent | 55c67d1fdb81dcfdf8f398b3184fc59256af513d (diff) | |
download | gitlab-f33c5230cb25c9a41e9f63c0846c1ecba7097ee7.tar.gz |
docs(cli): make examples more easily navigable by generating TOC
-rw-r--r-- | docs/cli-examples.rst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/cli-examples.rst b/docs/cli-examples.rst index 4208ef2..5f4e0bc 100644 --- a/docs/cli-examples.rst +++ b/docs/cli-examples.rst @@ -6,6 +6,9 @@ CLI examples For a complete list of objects and actions available, see :doc:`/cli-objects`. +Projects +-------- + List the projects (paginated): .. code-block:: console @@ -42,12 +45,18 @@ Get a specific project (id 2): $ gitlab project get --id 2 +Users +----- + Get a specific user by id: .. code-block:: console $ gitlab user get --id 3 +Deploy tokens +------------- + Create a deploy token for a project: .. code-block:: console @@ -61,6 +70,9 @@ List deploy tokens for a group: $ gitlab -v group-deploy-token list --group-id 3 +Packages +-------- + List packages for a project: .. code-block:: console @@ -99,12 +111,18 @@ Download a project's generic package: $ gitlab generic-package download --project-id 1 --package-name hello-world \ --package-version v1.0.0 --file-name hello.tar.gz > /path/to/hello.tar.gz +Issues +------ + Get a list of issues for this project: .. code-block:: console $ gitlab project-issue list --project-id 2 +Snippets +-------- + Delete a snippet (id 3): .. code-block:: console @@ -128,6 +146,9 @@ Create a snippet: $ gitlab project-snippet create --project-id 2 --title "the title" \ --file-name "the name" --code "the code" +Commits +------- + Get a specific project commit by its SHA id: .. code-block:: console @@ -149,12 +170,18 @@ Define the status of a commit (as would be done from a CI tool for example): --target-url http://server/build/123 \ --description "Jenkins build succeeded" +Artifacts +--------- + Download the artifacts zip archive of a job: .. code-block:: console $ gitlab project-job artifacts --id 10 --project-id 1 > artifacts.zip +Other +----- + Use sudo to act as another user (admin only): .. code-block:: console |