Skip to content

Commit f8a2beb

Browse files
authored
Documenting CLI pipeline-oriented sub-commands
* Adding and CLI commands to documentation * Using proper name * Documenting sub-command * Using minimal usage example * Fixing typos and formatting * Refining naming * Clarifying arguments * Improving layout for arguments and flags
1 parent 10bfa33 commit f8a2beb

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

docs/guides/modules/toolkit/pages/how-to-use-the-circleci-local-cli.adoc

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,65 @@ circleci dlc purge <vcs-type> <org-id> <project-id>
412412

413413
For full details on the `dlc purge` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_project_dlc.html[CLI docs].
414414

415+
416+
[#pipeline-management]
417+
== Pipeline management
418+
419+
The CircleCI CLI allows you to operate on pipelines. You can use the CLI to create a new pipeline definition, list existing pipeline definitions, or run a specific pipeline.
420+
421+
=== Create a new pipeline definition for a project
422+
423+
Use the `create` sub-command to create a new pipeline definition for your project.
424+
425+
NOTE: The `create` sub-command of the `pipeline` command only applies to pipeline definitions created with the GitHub App provider Organization slug starts with `circleci` followed by a UUID. For example, `circleci/34R3kN5RtfEE7v4sa4nWAU`. You can find your organization slug under menu:Organization Settings[Overview]).
426+
427+
[,shell]
428+
----
429+
circleci pipeline create <project-id> [flags]
430+
----
431+
432+
- `<project-id>` is the ID of the project for which you are creating the pipeline definition. You can find it from the CircleCI web app under menu:Project Settings[Overview].
433+
434+
The above example shows the minimal usage. You will be prompted for required values if you do not intially provide them using the appropriate flags. For example:
435+
436+
- `--repo-id` is the flag that allows you to specify the ID of the GitHub repository you wish to build a pipeline definition for. It is required if the config file is in a different repository than the code repository. Refer to the link:https://docs.github.com/en/rest/repos/repos?api#get-a-repository[GitHub documentation] to find the ID.
437+
438+
For full details on the `create` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_pipeline_create.html[CLI docs].
439+
440+
441+
=== List pipeline definitions for a project
442+
443+
Use the `list` sub-command to list all pipeline definitions for your project.
444+
445+
[,shell]
446+
----
447+
circleci pipeline list <project-id> [flags]
448+
----
449+
450+
- `<project-id>` is the ID of the project you wish to list the pipeline definitions for. You can find it from the CircleCI web app under menu:Project Settings[Overview].
451+
452+
For full details on the `list` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_pipeline_list.html[CLI docs].
453+
454+
=== Run a pipeline
455+
456+
Use the `run` sub-command to run a specific pipeline.
457+
458+
[,shell]
459+
----
460+
circleci pipeline run <org-id> <project-id> [flags]
461+
----
462+
463+
- `<org-id>` is the ID of the organization associated with the pipeline definition. You can find it from the CircleCI web app under menu:Organization Settings[Overview].
464+
465+
- `<project-id>` is the ID of the project associated with the pipeline definition. You can find it from the CircleCI web app under menu:Project Settings[Overview].
466+
467+
The above example shows the minimal usage. You will be prompted for required values if you do not intially provide them using the appropriate flags. For example:
468+
469+
- `--pipeline-definition-id` is the flag that allows you to provide the ID of the pipeline definition to run. If not provided, you will be prompted to enter it. You can retrieve it from the CircleCI web app by selecting btn:[Copy] for the chosen pipeline, under menu:Project settings[Pipelines].
470+
471+
For full details on the `run` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_pipeline_run.html[CLI docs].
472+
473+
415474
[#context-management]
416475
== Context management
417476

0 commit comments

Comments
 (0)