1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

Merge pull request #24671 from openshift-cherrypick-robot/cherry-pick-24467-to-enterprise-4.6

[enterprise-4.6] Separating command and output for tkn CLI docs
This commit is contained in:
Andrea Hoffer
2020-08-10 14:27:38 -04:00
committed by GitHub
14 changed files with 77 additions and 5 deletions

View File

@@ -17,42 +17,49 @@ For {op-system-base-full} version 8, you can install the {pipelines-title} CLI (
. Register with Red Hat Subscription Manager:
+
[source,terminal]
----
# subscription-manager register
----
. Pull the latest subscription data:
+
[source,terminal]
----
# subscription-manager refresh
----
. List the available subscriptions:
+
[source,terminal]
----
# subscription-manager list --available --matches '*pipelines*'
----
. In the output for the previous command, find the pool ID for your {product-title} subscription and attach the subscription to the registered system:
+
[source,terminal]
----
# subscription-manager attach --pool=<pool_id>
----
. Enable the repositories required by {pipelines-title}:
+
[source,terminal]
----
# subscription-manager repos --enable="pipelines-1.0-for-rhel-8-x86_64-rpms"
----
. Install the `openshift-pipelines-client` package:
+
[source,terminal]
----
# yum install openshift-pipelines-client
----
After you install the CLI, it is available using the `tkn` command:
[source,terminal]
----
$ tkn version
----

View File

@@ -14,6 +14,7 @@ For Linux distributions, you can download the CLI directly as a `tar.gz` archive
. Unpack the archive:
+
[source,terminal]
----
$ tar xvzf <file>
----
@@ -22,6 +23,7 @@ $ tar xvzf <file>
. To check your `PATH`, run:
+
[source,terminal]
----
$ echo $PATH
----

View File

@@ -18,6 +18,7 @@ For macOS, the `tkn` CLI is provided as a `tar.gz` archive.
. To check your `PATH`, open a terminal window and run:
+
[source,terminal]
----
$ echo $PATH
----

View File

@@ -18,6 +18,7 @@ For Windows, the `tkn` CLI is provided as a `zip` archive.
. To check your `PATH`, open the command prompt and run the command:
+
[source,terminal]
----
C:\> path
----

View File

@@ -9,6 +9,7 @@
Manage ClusterTasks.
.Example: Display help
[source,terminal]
----
$ tkn clustertask --help
----
@@ -17,6 +18,7 @@ $ tkn clustertask --help
Delete a ClusterTask resource in a cluster.
.Example: Delete `mytask1` and `mytask2` ClusterTasks
[source,terminal]
----
$ tkn clustertask delete mytask1 mytask2
----
@@ -25,6 +27,7 @@ $ tkn clustertask delete mytask1 mytask2
Describe a ClusterTask.
.Example: Describe the `mytask` ClusterTask
[source,terminal]
----
$ tkn clustertask describe mytask1
----
@@ -33,6 +36,7 @@ $ tkn clustertask describe mytask1
List ClusterTasks.
.Example: List ClusterTasks
[source,terminal]
----
$ tkn clustertask list
----
@@ -40,6 +44,7 @@ $ tkn clustertask list
Start ClusterTasks.
.Example: Start the `mytask` ClusterTask
[source,terminal]
----
$ tkn clustertask start mytask
----

View File

@@ -9,6 +9,7 @@
Manage Conditions.
.Example: Display help
[source,terminal]
----
$ tkn condition --help
----
@@ -17,6 +18,7 @@ $ tkn condition --help
Delete a Condition.
.Example: Delete the `mycondition1` Condition from a namespace
[source,terminal]
----
$ tkn condition delete mycondition1 -n myspace
----
@@ -25,6 +27,7 @@ $ tkn condition delete mycondition1 -n myspace
Describe a Condition.
.Example: Describe the `mycondition1` Condition in a namespace
[source,terminal]
----
$ tkn condition describe mycondition1 -n myspace
----
@@ -33,6 +36,7 @@ $ tkn condition describe mycondition1 -n myspace
List Conditions.
.Example: List Conditions in a namespace
[source,terminal]
----
$ tkn condition list -n myspace
----

View File

@@ -18,12 +18,14 @@ The following procedure enables tab completion for Bash.
. Save the Bash completion code to a file:
+
[source,terminal]
----
$ tkn completion bash > tkn_bash_completion
----
. Copy the file to `/etc/bash_completion.d/`:
+
[source,terminal]
----
$ sudo cp tkn_bash_completion /etc/bash_completion.d/
----

View File

@@ -9,6 +9,7 @@
Manage Pipelines.
.Example: Display help
[source,terminal]
----
$ tkn pipeline --help
----
@@ -17,6 +18,7 @@ $ tkn pipeline --help
Create a Pipeline.
.Example: Create a Pipeline defined by the `mypipeline.yaml` file in a namespace
[source,terminal]
-----
$ tkn pipeline create -f mypipeline.yaml -n myspace
-----
@@ -26,6 +28,7 @@ $ tkn pipeline create -f mypipeline.yaml -n myspace
Delete a Pipeline.
.Example: Delete the `mypipeline` Pipeline from a namespace
[source,terminal]
----
$ tkn pipeline delete mypipeline -n myspace
----
@@ -34,6 +37,7 @@ $ tkn pipeline delete mypipeline -n myspace
Describe a Pipeline.
.Example: Describe `mypipeline` Pipeline
[source,terminal]
----
$ tkn pipeline describe mypipeline
----
@@ -42,6 +46,7 @@ $ tkn pipeline describe mypipeline
List Pipelines.
.Example: Display a list of Pipelines
[source,terminal]
-----
$ tkn pipeline list
-----
@@ -50,6 +55,7 @@ $ tkn pipeline list
Display Pipeline logs for a specific Pipeline.
.Example: Stream live logs for the `mypipeline` Pipeline
[source,terminal]
----
$ tkn pipeline logs -f mypipeline
----
@@ -58,6 +64,7 @@ $ tkn pipeline logs -f mypipeline
Start a Pipeline.
.Example: Start `mypipeline` Pipeline
[source,terminal]
----
$ tkn pipeline start mypipeline
----

View File

@@ -9,6 +9,7 @@
Manage Pipeline Resources.
.Example: Display help
[source,terminal]
----
$ tkn resource -h
----
@@ -17,6 +18,7 @@ $ tkn resource -h
Create a Pipeline Resource.
.Example: Create Pipeline Resource defined by the `myresource.yaml` file in a namespace
[source,terminal]
----
$ tkn resource create -f myresource.yaml -n myspace
----
@@ -25,6 +27,7 @@ $ tkn resource create -f myresource.yaml -n myspace
Delete a Pipeline Resource.
.Example: Delete the `myresource` Pipeline Resource from a namespace
[source,terminal]
----
$ tkn resource delete myresource -n myspace
----
@@ -33,6 +36,7 @@ $ tkn resource delete myresource -n myspace
Describe a Pipeline Resource.
.Example: Describe the `myresource` Pipeline Resource
[source,terminal]
----
$ tkn resource describe myresource -n myspace
----
@@ -40,6 +44,7 @@ $ tkn resource describe myresource -n myspace
List Pipeline Resources.
.Example: List all Pipeline Resources in a namespace
[source,terminal]
----
$ tkn resource list -n myspace
----

View File

@@ -10,6 +10,7 @@
Manage PipelineRuns.
.Example: Display help
[source,terminal]
----
$ tkn pipelinerun -h
----
@@ -18,6 +19,7 @@ $ tkn pipelinerun -h
Cancel a PipelineRun.
.Example: Cancel the `mypipelinerun` PipelineRun from a namespace
[source,terminal]
----
$ tkn pipelinerun cancel mypipelinerun -n myspace
----
@@ -26,6 +28,7 @@ $ tkn pipelinerun cancel mypipelinerun -n myspace
Delete a PipelineRun.
.Example: Delete PipelineRuns from a namespace
[source,terminal]
----
$ tkn pipelinerun delete mypipelinerun1 mypipelinerun2 -n myspace
----
@@ -34,14 +37,16 @@ $ tkn pipelinerun delete mypipelinerun1 mypipelinerun2 -n myspace
Describe a PipelineRun.
.Example: Describe the `mypipelinerun` PipelineRun in a namespace
[source,terminal]
----
tkn pipelinerun describe mypipelinerun -n myspace
$ tkn pipelinerun describe mypipelinerun -n myspace
----
== pipelinerun list
List PipelineRuns.
.Example: Display a list of PipelineRuns in a namespace
[source,terminal]
----
$ tkn pipelinerun list -n myspace
----
@@ -50,6 +55,7 @@ $ tkn pipelinerun list -n myspace
Display the logs of a PipelineRun.
.Example: Display the logs of the `mypipelinerun` PipelineRun with all tasks and steps in a namespace
[source,terminal]
----
$ tkn pipelinerun logs mypipelinerun -a -n myspace
----

View File

@@ -9,6 +9,7 @@
Manage Tasks.
.Example: Display help
[source,terminal]
----
$ tkn task -h
----
@@ -17,6 +18,7 @@ $ tkn task -h
Create a Task.
.Example: Create a Task defined by the `mytask.yaml` file in a namespace
[source,terminal]
----
$ tkn task create -f mytask.yaml -n myspace
----
@@ -25,6 +27,7 @@ $ tkn task create -f mytask.yaml -n myspace
Delete a Task.
.Example: Delete `mytask1` and `mytask2` Tasks from a namespace
[source,terminal]
----
$ tkn task delete mytask1 mytask2 -n myspace
----
@@ -33,6 +36,7 @@ $ tkn task delete mytask1 mytask2 -n myspace
Describe a Task.
.Example: Describe the `mytask` Task in a namespace
[source,terminal]
----
$ tkn task describe mytask -n myspace
----
@@ -41,6 +45,7 @@ $ tkn task describe mytask -n myspace
List Tasks.
.Example: List all the Tasks in a namespace
[source,terminal]
----
$ tkn task list -n myspace
----
@@ -49,6 +54,7 @@ $ tkn task list -n myspace
Display Task logs.
.Example: Display logs for the `mytaskrun` TaskRun of the `mytask` Task
[source,terminal]
----
$ tkn task logs mytask mytaskrun -n myspace
----
@@ -57,6 +63,7 @@ $ tkn task logs mytask mytaskrun -n myspace
Start a Task.
.Example: Start the `mytask` Task in a namespace
[source,terminal]
----
$ tkn task start mytask -s <ServiceAccountName> -n myspace
----

View File

@@ -9,6 +9,7 @@
Manage TaskRuns.
.Example: Display help
[source,terminal]
----
$ tkn taskrun -h
----
@@ -17,6 +18,7 @@ $ tkn taskrun -h
Cancel a TaskRun.
.Example: Cancel the `mytaskrun` TaskRun from a namespace
[source,terminal]
----
$ tkn taskrun cancel mytaskrun -n myspace
----
@@ -25,6 +27,7 @@ $ tkn taskrun cancel mytaskrun -n myspace
Delete a TaskRun.
.Example: Delete `mytaskrun1` and `mytaskrun2` TaskRuns from a namespace
[source,terminal]
----
$ tkn taskrun delete mytaskrun1 mytaskrun2 -n myspace
----
@@ -33,6 +36,7 @@ $ tkn taskrun delete mytaskrun1 mytaskrun2 -n myspace
Describe a TaskRun.
.Example: Describe the `mytaskrun` TaskRun in a namespace
[source,terminal]
----
$ tkn taskrun describe mytaskrun -n myspace
----
@@ -41,6 +45,7 @@ $ tkn taskrun describe mytaskrun -n myspace
List TaskRuns.
.Example: List all TaskRuns in a namespace
[source,terminal]
----
$ tkn taskrun list -n myspace
----
@@ -51,6 +56,7 @@ Display TaskRun logs.
.Example: Display live logs for the `mytaskrun` TaskRun in a namespace
[source,terminal]
----
$ tkn taskrun logs -f mytaskrun -n myspace
----

View File

@@ -9,6 +9,7 @@
Manage EventListeners.
.Example: Display help
[source,terminal]
----
$ tkn eventlistener -h
----
@@ -17,6 +18,7 @@ $ tkn eventlistener -h
Delete an EventListener.
.Example: Delete `mylistener1` and `mylistener2` EventListeners in a namespace
[source,terminal]
----
$ tkn eventlistener delete mylistener1 mylistener2 -n myspace
----
@@ -24,6 +26,7 @@ $ tkn eventlistener delete mylistener1 mylistener2 -n myspace
Describe an EventListener.
.Example: Describe the `mylistener` EventListener in a namespace
[source,terminal]
----
$ tkn eventlistener describe mylistener -n myspace
----
@@ -32,6 +35,7 @@ $ tkn eventlistener describe mylistener -n myspace
List EventListeners.
.Example: List all the EventListeners in a namespace
[source,terminal]
----
$ tkn eventlistener list -n myspace
----
@@ -40,6 +44,7 @@ $ tkn eventlistener list -n myspace
Manage TriggerBindings.
.Example: Display TriggerBindings help
[source,terminal]
----
$ tkn triggerbinding -h
----
@@ -48,6 +53,7 @@ $ tkn triggerbinding -h
Delete a TriggerBinding.
.Example: Delete `mybinding1` and `mybinding2` TriggerBindings in a namespace
[source,terminal]
----
$ tkn triggerbinding delete mybinding1 mybinding2 -n myspace
----
@@ -55,6 +61,7 @@ $ tkn triggerbinding delete mybinding1 mybinding2 -n myspace
Describe a TriggerBinding.
.Example: Describe the `mybinding` TriggerBinding in a namespace
[source,terminal]
----
$ tkn triggerbinding describe mybinding -n myspace
----
@@ -63,6 +70,7 @@ $ tkn triggerbinding describe mybinding -n myspace
List TriggerBindings.
.Example: List all the TriggerBindings in a namespace
[source,terminal]
----
$ tkn triggerbinding list -n myspace
----
@@ -71,6 +79,7 @@ $ tkn triggerbinding list -n myspace
Manage TriggerTemplates.
.Example: Display TriggerTemplate help
[source,terminal]
----
$ tkn triggertemplate -h
----
@@ -78,6 +87,7 @@ $ tkn triggertemplate -h
Delete a TriggerTemplate.
.Example: Delete `mytemplate1` and `mytemplate2` TriggerTemplates in a namespace
[source,terminal]
----
$ tkn triggertemplate delete mytemplate1 mytemplate2 -n `myspace`
----
@@ -85,6 +95,7 @@ $ tkn triggertemplate delete mytemplate1 mytemplate2 -n `myspace`
Describe a TriggerTemplate.
.Example: Describe the `mytemplate` TriggerTemplate in a namespace
[source,terminal]
----
$ tkn triggertemplate describe mytemplate -n `myspace`
----
@@ -93,6 +104,7 @@ $ tkn triggertemplate describe mytemplate -n `myspace`
List TriggerTemplates.
.Example: List all the TriggerTemplates in a namespace
[source,terminal]
----
$ tkn triggertemplate list -n myspace
----
@@ -100,6 +112,7 @@ $ tkn triggertemplate list -n myspace
Manage ClusterTriggerBindings.
.Example: Display ClusterTriggerBindings help
[source,terminal]
----
$ tkn clustertriggerbinding -h
----
@@ -108,6 +121,7 @@ $ tkn clustertriggerbinding -h
Delete a ClusterTriggerBinding.
.Example: Delete `myclusterbinding1` and `myclusterbinding2` ClusterTriggerBindings
[source,terminal]
----
$ tkn clustertriggerbinding delete myclusterbinding1 myclusterbinding2
----
@@ -115,6 +129,7 @@ $ tkn clustertriggerbinding delete myclusterbinding1 myclusterbinding2
Describe a ClusterTriggerBinding.
.Example: Describe the `myclusterbinding` ClusterTriggerBinding
[source,terminal]
----
$ tkn clustertriggerbinding describe myclusterbinding
----
@@ -123,6 +138,7 @@ $ tkn clustertriggerbinding describe myclusterbinding
List ClusterTriggerBindings.
.Example: List all ClusterTriggerBindings
[source,terminal]
----
$ tkn clustertriggerbinding list
----

View File

@@ -9,14 +9,16 @@
Parent command for `tkn` CLI.
.Example: Display all options
-----
[source,terminal]
----
$ tkn
-----
----
== completion [shell]
Print shell completion code which must be evaluated to provide interactive completion. Supported shells are `bash` and `zsh`.
.Example: Completion code for `bash` shell
[source,terminal]
----
$ tkn completion bash
----
@@ -25,6 +27,7 @@ $ tkn completion bash
Print version information of the `tkn` CLI.
.Example: Check the `tkn` version
-----
[source,terminal]
----
$ tkn version
-----
----