From 4813a9790c2665b1ea061ee590f5fed76c7891b3 Mon Sep 17 00:00:00 2001 From: Misha Ramendik Date: Tue, 24 Jun 2025 04:55:49 +0100 Subject: [PATCH 01/11] RHDEVDOCS 6414 new Results CLI --- modules/op-prepare-opc-for-results.adoc | 3 + modules/op-query-results-name.adoc | 4 +- modules/op-results-concepts.adoc | 7 +- modules/op-results-opc-config.adoc | 70 +++++++++++ modules/op-results-opc-pipelinerunlist.adoc | 46 ++++++++ .../op-results-opc-pipelinerunresults.adoc | 109 ++++++++++++++++++ modules/op-results-opc-taskrunlist.adoc | 66 +++++++++++ modules/op-results-opc-taskrunresults.adoc | 93 +++++++++++++++ modules/op-results-search-results.adoc | 2 +- ...for-openshift-pipelines-observability.adoc | 18 ++- 10 files changed, 413 insertions(+), 5 deletions(-) create mode 100644 modules/op-results-opc-config.adoc create mode 100644 modules/op-results-opc-pipelinerunlist.adoc create mode 100644 modules/op-results-opc-pipelinerunresults.adoc create mode 100644 modules/op-results-opc-taskrunlist.adoc create mode 100644 modules/op-results-opc-taskrunresults.adoc diff --git a/modules/op-prepare-opc-for-results.adoc b/modules/op-prepare-opc-for-results.adoc index f796e0cd096e..50d597733ef5 100644 --- a/modules/op-prepare-opc-for-results.adoc +++ b/modules/op-prepare-opc-for-results.adoc @@ -12,6 +12,7 @@ Before you can query {tekton-results}, you must prepare the environment for the .Prerequisites * You installed the `opc` utility. +* You logged on to the {OCP} cluster using the {oc-first}. .Procedure @@ -29,6 +30,8 @@ $ export RESULTS_API=$(oc get route tekton-results-api-service -n openshift-pipe $ oc create token ---- + +Replace `` with the name of an {OCP} service account that has read access to the namespaces where {pipelines-shortname} ran the pipeline runs and task runs. ++ Save the string that this command outputs. . Optional: Create the `~/.config/tkn/results.yaml` file for automatic authentication with the {tekton-results} API. The file must have the following contents: diff --git a/modules/op-query-results-name.adoc b/modules/op-query-results-name.adoc index 44f6f6e9ae9b..d89edde35340 100644 --- a/modules/op-query-results-name.adoc +++ b/modules/op-query-results-name.adoc @@ -21,13 +21,13 @@ You can list and query results and records using their names. + [source,terminal] ---- -$ opc results list --addr ${RESULTS_API} +$ opc results result list --addr ${RESULTS_API} ---- + .Example command [source,terminal] ---- -$ opc results list --addr ${RESULTS_API} results-testing +$ opc results result list --addr ${RESULTS_API} results-testing ---- + .Example output diff --git a/modules/op-results-concepts.adoc b/modules/op-results-concepts.adoc index dc3942e4da5b..29a7ee31daee 100644 --- a/modules/op-results-concepts.adoc +++ b/modules/op-results-concepts.adoc @@ -170,4 +170,9 @@ $ oc get pipelinerun -o yaml You can access every result and record by its name. You can also use Common Expression Language (CEL) queries to search for results and records by the information they contain, including the YAML manifest. -You can also configure {tekton-results} to facilitate forwarding the logging information of all the tools that ran as a part of a pipeline or task to LokiStack. You can then query {tekton-results} for logging information of the task run associated with a {tekton-results} record. +You can configure {tekton-results} to facilitate forwarding the logging information of all the tools that ran as a part of a pipeline or task to LokiStack. You can then query {tekton-results} for logging information of the task run associated with a {tekton-results} record. + +You can also query results and logs by the names of pipeline runs and task runs. + +:FeatureName: Querying results and logs by the names of pipeline runs and task runs +include::snippets/technology-preview.adoc[] diff --git a/modules/op-results-opc-config.adoc b/modules/op-results-opc-config.adoc new file mode 100644 index 000000000000..9d951b072db2 --- /dev/null +++ b/modules/op-results-opc-config.adoc @@ -0,0 +1,70 @@ +// This module is included in the following assembly: +// +// * records/using-tekton-results-for-openshift-pipelines-observability.adoc + +:_mod-docs-content-type: PROCEDURE +[id="results-opc-config_{context}"] += Configuring the opc utility for querying results by pipeline run and task run names + +[role="_abstract"] +Before you can query results from {tekton-results} by pipeline run and task run names, you must configure the `opc` utility. + +.Prerequisites + +* You installed the `opc` utility. +* You logged on to the {OCP} cluster using the {oc-first}. + +.Procedure + +. Create an authentication token for the {tekton-results} API by entering the following command: ++ +[source,terminal] +---- +$ oc create token +---- ++ +Replace `` with the name of an {OCP} service account that has read access to the namespaces where {pipelines-shortname} ran the pipeline runs and task runs. ++ +Save the string that this command outputs. + +. Complete one of the following steps: + +** Configure the `opc` utility interactively by entering the following command: ++ +[source,terminal] +---- +$ opc results config set +---- ++ +Reply to the prompts that the utility displays. For `Token`, enter the authentication token that you created. + +** Configure the `opc` utility from a command by entering the following command: ++ +[source,terminal] +---- +$ opc results config set --no-prompt \ + --host="https://tekton-results.example.com" --token="sha256~xyz" +---- ++ +Replace the host name with the fully qualified domain name of your {tekton-results} route. Replace `sha256~xyz` with the wuahtntication token that you generated. + + +.Verification + +You can view the configuration that you set for the `opc` utility by entering the following command: + +[source,terminal] +---- +$ opc results config view +---- + +.Example output of the `opc results config view` command +[source] +---- +api-path: "" +apiVersion: results.tekton.dev/v1alpha2 +host: https://tekton-results.openshiftapps.com +insecure-skip-tls-verify: "true" +kind: Client +token: sha256~xyz +---- diff --git a/modules/op-results-opc-pipelinerunlist.adoc b/modules/op-results-opc-pipelinerunlist.adoc new file mode 100644 index 000000000000..3e517a3d8803 --- /dev/null +++ b/modules/op-results-opc-pipelinerunlist.adoc @@ -0,0 +1,46 @@ +// This module is included in the following assembly: +// +// * records/using-tekton-results-for-openshift-pipelines-observability.adoc + +:_mod-docs-content-type: PROCEDURE +[id="results-opc-pipelinerunlist_{context}"] += Viewing a list of pipeline run names and identifiers + +[role="_abstract"] +You can use the `opc` utility to view a lists of names and identifiers of pipeline runs in a namespace. + + +.Prerequisites + +* You installed the `opc` utility. +* You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. + +.Procedure + +* Enter the following command: ++ +[source,terminal] +---- +$ opc results pipelinerun list -n +---- ++ +Optionally, specify the `--limit` parameter, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names, and then prompts you co continue or quit. ++ +Optionally, specify the `--labels` parameter, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the pipeline runs that have the specified labels or annotations. ++ +.Example output of the `opc results pipelinerun list` command ++ +[source] +---- +NAME UID STARTED DURATION STATUS +openshift-pipelines-main-release-tests-zscq8 78515e3a-8e20-43e8-a064-d2442c2ae845 1 week ago 5s Failed(CouldntGetPipeline) +openshift-pipelines-main-release-tests-zrgv6 14226144-2d08-440d-a600-d602ca46cdf6 1 week ago 26m13s Failed +openshift-pipelines-main-release-tests-jdc24 e34daea2-66fb-4c7d-9d4b-d9d82a07b6cd 1 week ago 5s Failed(CouldntGetPipeline) +openshift-pipelines-main-release-tests-6zj7f 9b3e5d68-70ab-4c23-8872-e7ad7121e60b 1 week ago 5s Failed(CouldntGetPipeline) +openshift-pipelines-main-release-tests-kkk9t 2fd28c48-388b-4e6a-9ec3-2bcd9dedebc3 1 week ago 5s Failed(CouldntGetPipeline) +---- + +[NOTE] +==== +You can use the short form `opc results pr list` instead of `opc results pipelinerun list`. +==== diff --git a/modules/op-results-opc-pipelinerunresults.adoc b/modules/op-results-opc-pipelinerunresults.adoc new file mode 100644 index 000000000000..77252cdc30c7 --- /dev/null +++ b/modules/op-results-opc-pipelinerunresults.adoc @@ -0,0 +1,109 @@ +// This module is included in the following assembly: +// +// * records/using-tekton-results-for-openshift-pipelines-observability.adoc + +:_mod-docs-content-type: PROCEDURE +[id="results-opc-pipelinerunresults_{context}"] += Viewing result information for a pipeline run + +[role="_abstract"] +You can use the `opc` utility to view a description of when and how a pipeline run completed, a full manifest for the pipeline run, and any logs that the pipeline run produced. + +.Prerequisites + +* You installed the `opc` utility. +* You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. +* You have the name or UUID of the pipeline run. You can use the `ocp results list pipelineruns` commands to view names and UUIDs of pipelines runs for which results are available. + +.Procedure + +* Use any of the following commands to view the result information for a pipeline run: +** To view a description of when and how the pipeline run completed, enter the following command: ++ +[source,terminal] +---- +$ opc results pipelinerun describe +---- ++ +Alternatively, you can use the pipeline run UUID instead of the name: ++ +[source,terminal] +---- +$ opc results pipelinerun describe --uuid +---- ++ +.Example output of the `opc results pipelinerun describe` command +[source] +---- +Name: operator-main-index-4-18-on-pull-request-7kssl +Namespace: tekton-ecosystem-tenant +Service Account: appstudio-pipeline +Labels: + app.kubernetes.io/managed-by=pipelinesascode.tekton.dev + app.kubernetes.io/version=v0.33.0 +Annotations: + appstudio.openshift.io/snapshot=openshift-pipelines-main-b7jj6 + build.appstudio.openshift.io/repo=https://github.com/openshift-pipelines/operator?rev=ba5e62e51af0c88bc6c3fd4201e789bdfc093daa + +📌 Status +STARTED DURATION STATUS +27d ago 9m54s Succeeded + +⏱ Timeouts +Pipeline: 2h0m0s + +⚓ Params + NAME VALUE + • git-url https://github.com/pramodbindal/operator + • revision ba5e62e51af0c88bc6c3fd4201e789bdfc093daa + +🗂 Workspaces + NAME SUB PATH WORKSPACE BINDING + • workspace --- VolumeClaimTemplate + • git-auth --- Secret (secret=pac-gitauth-ceqzjt) + +📦 Taskruns + NAME TASK NAME + • operator-main-index-4-18-on-pull-request-7kssl-init init + • operator-main-index-4-18-on-pull-request-7kssl-clone-repository clone-repository +---- + +* To view the full YAML manifest of the pipeline run, enter the following command: ++ +[source,terminal] +---- +$ opc results pipelinerun describe --yaml +---- ++ +Alternatively, you can use the pipeline run UUID instead of the name: ++ +[source,terminal] +---- +$ opc results pipelinerun describe --yaml --uuid +---- + +* To view the logs associated with the pipeline run, enter the following command: ++ +[source,terminal] +---- +$ opc results pipelinerun logs +---- ++ +Alternatively, you can use the pipeline run UUID instead of the name: ++ +[source,terminal] +---- +$ opc results pipelinerun logs --yaml --uuid +---- + +[IMPORTANT] +==== +Logs that the `opc results pipelinerun logs` displays do not include logs of task runs that completed within this pipeline runs. To view these logs, find the names of the task runs in this pipeline run using the `opc results taskrun list --pipelinerun` command and specify the name of the pipeline run. Then use the `opc results taskrun log` command to view the logs for the task runs. +==== + +[NOTE] +==== +You can use the short form `opc results pr desc` instead of `opc results pipelinerun describe`. + +You can use the short form `opc results pr logs` instead of `opc results pipelinerun logs`. +==== diff --git a/modules/op-results-opc-taskrunlist.adoc b/modules/op-results-opc-taskrunlist.adoc new file mode 100644 index 000000000000..c86340cbb61a --- /dev/null +++ b/modules/op-results-opc-taskrunlist.adoc @@ -0,0 +1,66 @@ +// This module is included in the following assembly: +// +// * records/using-tekton-results-for-openshift-pipelines-observability.adoc + +:_mod-docs-content-type: PROCEDURE +[id="results-opc-taskrunlist_{context}"] += Viewing a list of task run names and identifiers + +[role="_abstract"] +You can use the `opc` utility to view a lists of names and identifiers of task runs in a namespace or of task runs associated with a pipeline dun. + + +.Prerequisites + +* You installed the `opc` utility. +* You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. + +.Procedure + +* To view a list of all task runs in a namespace, enter the following command: ++ +[source,terminal] +---- +$ opc results taskrun list -n +---- ++ +Optionally, specify the `--limit` parameter, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names, and then prompts you co continue or quit. ++ +Optionally, specify the `--labels` parameter, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the task runs that have the specified labels or annotations. ++ +.Example output of the `opc results pipelinerun list` command for a namespace ++ +[source] +---- +NAME UID STARTED DURATION STATUS +openshift-pipelines-main-release-tests-zrgv6-e2e-test 10d6952f-b926-4e4b-a976-519867969ce7 16d ago 12m41s Failed +openshift-pipelines-main-release-tests-zrgv6-deploy-operator ab41b63b-16ec-4a32-8b95-f2678eb5c945 16d ago 22s Succeeded +openshift-pipelines-main-release-tests-zrgv6-provision-cluster b374df00-5132-4633-91df-3259670756b3 16d ago 12m30s Succeeded +operator-main-index-4-18-on-pull-request-ml4ww-show-sbom c5b77784-cd87-4be8-bc12-28957762f382 16d ago 16s Succeeded +openshift-c4ae3a5a28e19ffc930e7c2aa758d85c-provision-eaas-space 22535d8e-d360-4143-9c0c-4bd0414a22b0 16d ago 17s Succeeded +---- + +* To view a list of task runs associate with a pipeline run, enter the following command: ++ +[source,terminal] +---- +$ opc results taskrun list --pipelinerun +---- ++ +Optionally, specify the `--limit` parameter, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names, and then prompts you co continue or quit. +.Example output of the `opc results taskrun list` command for a pipeline run ++ +[source] +---- +NAME UID STARTED DURATION STATUS +operator-main-index-4-18-on-pull-request-g95fk-show-sbom 5b405941-0d3e-4f8c-a68a-9ffcc481abf1 16d ago 13s Succeeded +operator-main-index-4-18-on-pul2b222db723593a186d12f1b82f1a1fd9 89588ae7-aa36-4b62-97d1-5634ee201850 16d ago 36s Succeeded +operator-fb80434867bc15d89fea82506058f664-fbc-fips-check-oci-ta 7598d44a-4370-459b-8ef0-ae4165c58ba5 16d ago 5m52s Succeeded +operator-main-index-4-18-on-pull-request-g95fk-validate-fbc fb80d962-807b-4b63-80cb-6a57d383755a 16d ago 1m26s Succeeded +operator-main-index-4-18-on-pull-request-g95fk-apply-tags 8a34b46d-74a9-4f20-9e99-a285f7b258d6 16d ago 13s Succeeded +---- + +[NOTE] +==== +You can use the short form `opc results tr list` instead of `opc results taskrun list`. +==== diff --git a/modules/op-results-opc-taskrunresults.adoc b/modules/op-results-opc-taskrunresults.adoc new file mode 100644 index 000000000000..a6da1ba7fd68 --- /dev/null +++ b/modules/op-results-opc-taskrunresults.adoc @@ -0,0 +1,93 @@ +// This module is included in the following assembly: +// +// * records/using-tekton-results-for-openshift-pipelines-observability.adoc + +:_mod-docs-content-type: PROCEDURE +[id="results-opc-taskrunresults_{context}"] += Viewing result information for a task run + +[role="_abstract"] +You can use the `opc` utility to view a description of when and how a task run completed, a full manifest for the task run, and any logs that the task run produced. + + +.Prerequisites + +* You installed the `opc` utility. +* You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. +* You have the name or UUID of the task run. You can use the `ocp results taskrun list` command to view names or UUIDs of task runs for which results are available. +* If you want to retrieve logs, you configured forwarding logs to LokiStack. + +.Procedure + +* Use any of the following commands to view the result information for a task run: +** To view a description of when and how the task run completed, enter the following command: ++ +[source,terminal] +---- +$ opc results taskrun describe +---- ++ +Alternatively, you can use the task run UUID instead of the name: ++ +[source,terminal] +---- +$ opc results taskrun describe --uuid +---- ++ +.Example output of the `opc results taskrun describe` command +[source] +---- +Name: operator-main-index-4-18-on-push-gc699-build-images-0 +Namespace: tekton-ecosystem-tenant +Service Account: appstudio-pipeline +Labels: + tekton.dev/pipelineTask=build-images + tekton.dev/task=buildah-remote-oci-ta +Annotations: + pipelinesascode.tekton.dev/branch=main + pipelinesascode.tekton.dev/check-run-id=40080193061 + +📌 Status +STARTED DURATION STATUS +28d ago 3m22s Failed + +⚓ Params + NAME VALUE + • PLATFORM linux-m2xlarge/arm64 + • IMAGE quay.io/redhat-user-workloads/tekton-ecosystem +---- + +* To view the full YAML manifest of the task run, enter the following command: ++ +[source,terminal] +---- +$ opc results taskrun describe --yaml +---- ++ +Alternatively, you can use the task run UUID instead of the name: ++ +[source,terminal] +---- +$ opc results taskrun describe --yaml --uuid +---- + +* To view the logs associated with the task run, enter the following command: ++ +[source,terminal] +---- +$ opc results taskrun logs +---- ++ +Alternatively, you can use the task run UUID instead of the name: ++ +[source,terminal] +---- +$ opc results taskrun logs --uuid +---- + +[NOTE] +==== +You can use the short form `opc results tr desc` instead of `opc results taskrun describe`. + +You can use the short form `opc results tr logs` instead of `opc results taskrun logs`. +==== diff --git a/modules/op-results-search-results.adoc b/modules/op-results-search-results.adoc index 2d189a5e5820..93184637588b 100644 --- a/modules/op-results-search-results.adoc +++ b/modules/op-results-search-results.adoc @@ -19,7 +19,7 @@ You can search for results using Common Expression Language (CEL) queries. For e + [source,terminal] ---- -$ opc results list --addr ${RESULTS_API} --filter="" +$ opc results result list --addr ${RESULTS_API} --filter="" ---- Replace `` with the namespace in which the pipeline runs or task runs were created. diff --git a/records/using-tekton-results-for-openshift-pipelines-observability.adoc b/records/using-tekton-results-for-openshift-pipelines-observability.adoc index b9c20235091f..b59b36f916e2 100644 --- a/records/using-tekton-results-for-openshift-pipelines-observability.adoc +++ b/records/using-tekton-results-for-openshift-pipelines-observability.adoc @@ -18,7 +18,7 @@ include::modules/op-results-db.adoc[leveloffset=+2] include::modules/op-configuring-retention-policy-results.adoc[leveloffset=+2] [id="querying-using-opc_using-tekton-results-for-openshift-pipelines-observability"] -== Querying {tekton-results} using the opc command line utility +== Querying {tekton-results} for results and records You can use the `opc` command line utility to query {tekton-results} for results and records. To install the `opc` command line utility, install the package for the `tkn` command line utility. For instructions about installing this package, see xref:../tkn_cli/installing-tkn.adoc#installing-tkn[Installing tkn]. @@ -42,3 +42,19 @@ include::modules/op-results-reference-records.adoc[leveloffset=+2] [id="additional-resources_{context}"] == Additional resources * link:https://cel.dev/[Common Expression Language (CEL)] + +[id="querying-pipelinerun-tasktun_using-tekton-results-for-openshift-pipelines-observability"] +== Querying results and logs by the names of pipeline runs and task runs + +You can use the `opc` command line utility to query {tekton-results} for lists of pipeline runs and tasks runs and then retrieve manifest and log information using the names of pipeline runs and tasks runs. + +This approach requires different configuration of the `opc` command line utility, compared to queries for results and records. + +:FeatureName: Querying results and logs by the names of pipeline runs and task runs +include::snippets/technology-preview.adoc[] + +include::modules/op-results-opc-config.adoc[leveloffset=+2] +include::modules/op-results-opc-pipelinerunlist.adoc[leveloffset=+2] +include::modules/op-results-opc-taskrunlist.adoc[leveloffset=+2] +include::modules/op-results-opc-pipelinerunresults.adoc[leveloffset=+2] +include::modules/op-results-opc-taskrunresults.adoc[leveloffset=+2] From bc9826ab39c87b2b491c632cf6dfe1d0ac81b57f Mon Sep 17 00:00:00 2001 From: Misha Ramendik Date: Tue, 24 Jun 2025 14:41:07 +0100 Subject: [PATCH 02/11] Dev corrections --- modules/op-results-opc-config.adoc | 3 +-- modules/op-results-opc-pipelinerunlist.adoc | 22 +++++++++++++++---- .../op-results-opc-pipelinerunresults.adoc | 10 ++++----- modules/op-results-opc-taskrunlist.adoc | 5 +++-- modules/op-results-opc-taskrunresults.adoc | 4 ++-- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/modules/op-results-opc-config.adoc b/modules/op-results-opc-config.adoc index 9d951b072db2..acae4fd85989 100644 --- a/modules/op-results-opc-config.adoc +++ b/modules/op-results-opc-config.adoc @@ -42,8 +42,7 @@ Reply to the prompts that the utility displays. For `Token`, enter the authentic + [source,terminal] ---- -$ opc results config set --no-prompt \ - --host="https://tekton-results.example.com" --token="sha256~xyz" +$ opc results config set --host="https://tekton-results.example.com" --token="sha256~xyz" ---- + Replace the host name with the fully qualified domain name of your {tekton-results} route. Replace `sha256~xyz` with the wuahtntication token that you generated. diff --git a/modules/op-results-opc-pipelinerunlist.adoc b/modules/op-results-opc-pipelinerunlist.adoc index 3e517a3d8803..3ded29c9a9c7 100644 --- a/modules/op-results-opc-pipelinerunlist.adoc +++ b/modules/op-results-opc-pipelinerunlist.adoc @@ -7,7 +7,7 @@ = Viewing a list of pipeline run names and identifiers [role="_abstract"] -You can use the `opc` utility to view a lists of names and identifiers of pipeline runs in a namespace. +You can use the `opc` utility to view a list of names and identifiers of pipeline runs in a namespace. .Prerequisites @@ -17,16 +17,18 @@ You can use the `opc` utility to view a lists of names and identifiers of pipeli .Procedure -* Enter the following command: +* Use any of the following commands to view pipeline runs: + +** To view all pipeline runs in a specified namespace, enter the following command: + [source,terminal] ---- $ opc results pipelinerun list -n ---- + -Optionally, specify the `--limit` parameter, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names, and then prompts you co continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. + -Optionally, specify the `--labels` parameter, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the pipeline runs that have the specified labels or annotations. +Optionally, specify the `--labels` command line option, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the pipeline runs that have the specified labels or annotations. + .Example output of the `opc results pipelinerun list` command + @@ -40,6 +42,18 @@ openshift-pipelines-main-release-tests-6zj7f 9b3e5d68-70ab-4c23-8872-e7ad7121e openshift-pipelines-main-release-tests-kkk9t 2fd28c48-388b-4e6a-9ec3-2bcd9dedebc3 1 week ago 5s Failed(CouldntGetPipeline) ---- +** To view pipeline runs related to specified named pipelines, enter the following command: ++ +[source,terminal] +---- +$ opc results pipelinerun list -n +---- ++ +The command lists all pipeline runs for pipelines that have names containing ``. For example, if you specify `build`, the command displays all pipeline runs related to pipelines named `build`, `build_123`, or `enhancedbuild`. ++ +Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. + + [NOTE] ==== You can use the short form `opc results pr list` instead of `opc results pipelinerun list`. diff --git a/modules/op-results-opc-pipelinerunresults.adoc b/modules/op-results-opc-pipelinerunresults.adoc index 77252cdc30c7..bc725d9d62ff 100644 --- a/modules/op-results-opc-pipelinerunresults.adoc +++ b/modules/op-results-opc-pipelinerunresults.adoc @@ -13,7 +13,7 @@ You can use the `opc` utility to view a description of when and how a pipeline r * You installed the `opc` utility. * You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. -* You have the name or UUID of the pipeline run. You can use the `ocp results list pipelineruns` commands to view names and UUIDs of pipelines runs for which results are available. +* You have the name or UUID of the pipeline run. You can use the `ocp results list pipelineruns` commands to view names and UUIDs of pipelines runs for which results are available. .Procedure @@ -22,7 +22,7 @@ You can use the `opc` utility to view a description of when and how a pipeline r + [source,terminal] ---- -$ opc results pipelinerun describe +$ opc results pipelinerun describe ---- + Alternatively, you can use the pipeline run UUID instead of the name: @@ -72,21 +72,21 @@ Pipeline: 2h0m0s + [source,terminal] ---- -$ opc results pipelinerun describe --yaml +$ opc results pipelinerun describe --output yaml ---- + Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun describe --yaml --uuid +$ opc results pipelinerun describe --output yaml --uuid ---- * To view the logs associated with the pipeline run, enter the following command: + [source,terminal] ---- -$ opc results pipelinerun logs +$ opc results pipelinerun logs ---- + Alternatively, you can use the pipeline run UUID instead of the name: diff --git a/modules/op-results-opc-taskrunlist.adoc b/modules/op-results-opc-taskrunlist.adoc index c86340cbb61a..61622636cbfd 100644 --- a/modules/op-results-opc-taskrunlist.adoc +++ b/modules/op-results-opc-taskrunlist.adoc @@ -24,7 +24,7 @@ You can use the `opc` utility to view a lists of names and identifiers of task r $ opc results taskrun list -n ---- + -Optionally, specify the `--limit` parameter, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names, and then prompts you co continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. + Optionally, specify the `--labels` parameter, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the task runs that have the specified labels or annotations. + @@ -47,7 +47,8 @@ openshift-c4ae3a5a28e19ffc930e7c2aa758d85c-provision-eaas-space 22535d8e-d360- $ opc results taskrun list --pipelinerun ---- + -Optionally, specify the `--limit` parameter, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names, and then prompts you co continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. + .Example output of the `opc results taskrun list` command for a pipeline run + [source] diff --git a/modules/op-results-opc-taskrunresults.adoc b/modules/op-results-opc-taskrunresults.adoc index a6da1ba7fd68..cc0b9870b380 100644 --- a/modules/op-results-opc-taskrunresults.adoc +++ b/modules/op-results-opc-taskrunresults.adoc @@ -61,14 +61,14 @@ STARTED DURATION STATUS + [source,terminal] ---- -$ opc results taskrun describe --yaml +$ opc results taskrun describe --output yaml ---- + Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun describe --yaml --uuid +$ opc results taskrun describe --output yaml --uuid ---- * To view the logs associated with the task run, enter the following command: From fd3280670c89e4e7e946e81fa6f2210da9470c01 Mon Sep 17 00:00:00 2001 From: Misha Ramendik Date: Tue, 24 Jun 2025 14:42:31 +0100 Subject: [PATCH 03/11] --uid fix --- modules/op-results-opc-pipelinerunresults.adoc | 6 +++--- modules/op-results-opc-taskrunresults.adoc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/op-results-opc-pipelinerunresults.adoc b/modules/op-results-opc-pipelinerunresults.adoc index bc725d9d62ff..0d7598dd262e 100644 --- a/modules/op-results-opc-pipelinerunresults.adoc +++ b/modules/op-results-opc-pipelinerunresults.adoc @@ -29,7 +29,7 @@ Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun describe --uuid +$ opc results pipelinerun describe --uid ---- + .Example output of the `opc results pipelinerun describe` command @@ -79,7 +79,7 @@ Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun describe --output yaml --uuid +$ opc results pipelinerun describe --output yaml --uid ---- * To view the logs associated with the pipeline run, enter the following command: @@ -93,7 +93,7 @@ Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun logs --yaml --uuid +$ opc results pipelinerun logs --yaml --uid ---- [IMPORTANT] diff --git a/modules/op-results-opc-taskrunresults.adoc b/modules/op-results-opc-taskrunresults.adoc index cc0b9870b380..9284d1f32ecd 100644 --- a/modules/op-results-opc-taskrunresults.adoc +++ b/modules/op-results-opc-taskrunresults.adoc @@ -31,7 +31,7 @@ Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun describe --uuid +$ opc results taskrun describe --uid ---- + .Example output of the `opc results taskrun describe` command @@ -68,7 +68,7 @@ Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun describe --output yaml --uuid +$ opc results taskrun describe --output yaml --u id ---- * To view the logs associated with the task run, enter the following command: @@ -82,7 +82,7 @@ Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun logs --uuid +$ opc results taskrun logs --uid ---- [NOTE] From eb262ba56ccef76fc332a14f1c0eaf9b617aed7e Mon Sep 17 00:00:00 2001 From: Misha Ramendik Date: Tue, 24 Jun 2025 14:44:14 +0100 Subject: [PATCH 04/11] small fixes --- modules/op-results-opc-pipelinerunresults.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-pipelinerunresults.adoc b/modules/op-results-opc-pipelinerunresults.adoc index 0d7598dd262e..d9d1cffe7a60 100644 --- a/modules/op-results-opc-pipelinerunresults.adoc +++ b/modules/op-results-opc-pipelinerunresults.adoc @@ -93,7 +93,7 @@ Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun logs --yaml --uid +$ opc results pipelinerun logs --uid ---- [IMPORTANT] From 437a542753a1b21fd415a945bc2318a719e49337 Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:06:15 +0100 Subject: [PATCH 05/11] Update modules/op-results-opc-pipelinerunlist.adoc Co-authored-by: Divyanshu Agrawal --- modules/op-results-opc-pipelinerunlist.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-pipelinerunlist.adoc b/modules/op-results-opc-pipelinerunlist.adoc index 3ded29c9a9c7..8ab01cea4da0 100644 --- a/modules/op-results-opc-pipelinerunlist.adoc +++ b/modules/op-results-opc-pipelinerunlist.adoc @@ -26,7 +26,7 @@ You can use the `opc` utility to view a list of names and identifiers of pipelin $ opc results pipelinerun list -n ---- + -Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit=10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. + Optionally, specify the `--labels` command line option, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the pipeline runs that have the specified labels or annotations. + From 6fe35afa9c54e99317c06dea61768d379b7ccfe7 Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:06:24 +0100 Subject: [PATCH 06/11] Update modules/op-results-opc-pipelinerunlist.adoc Co-authored-by: Divyanshu Agrawal --- modules/op-results-opc-pipelinerunlist.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-pipelinerunlist.adoc b/modules/op-results-opc-pipelinerunlist.adoc index 8ab01cea4da0..84909dd8b779 100644 --- a/modules/op-results-opc-pipelinerunlist.adoc +++ b/modules/op-results-opc-pipelinerunlist.adoc @@ -51,7 +51,7 @@ $ opc results pipelinerun list -n + The command lists all pipeline runs for pipelines that have names containing ``. For example, if you specify `build`, the command displays all pipeline runs related to pipelines named `build`, `build_123`, or `enhancedbuild`. + -Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit=10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. [NOTE] From 4f6056511a277000654877b42a7d8bb8923442d7 Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:06:34 +0100 Subject: [PATCH 07/11] Update modules/op-results-opc-taskrunresults.adoc Co-authored-by: Divyanshu Agrawal --- modules/op-results-opc-taskrunresults.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-taskrunresults.adoc b/modules/op-results-opc-taskrunresults.adoc index 9284d1f32ecd..9dbb5a9ae812 100644 --- a/modules/op-results-opc-taskrunresults.adoc +++ b/modules/op-results-opc-taskrunresults.adoc @@ -68,7 +68,7 @@ Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun describe --output yaml --u id +$ opc results taskrun describe --output yaml --uid ---- * To view the logs associated with the task run, enter the following command: From 2da7aa6b88b2923614cdb5bd25f490dae4a49cb2 Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:06:46 +0100 Subject: [PATCH 08/11] Update modules/op-results-opc-taskrunlist.adoc Co-authored-by: Divyanshu Agrawal --- modules/op-results-opc-taskrunlist.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-taskrunlist.adoc b/modules/op-results-opc-taskrunlist.adoc index 61622636cbfd..6dc4f80523a5 100644 --- a/modules/op-results-opc-taskrunlist.adoc +++ b/modules/op-results-opc-taskrunlist.adoc @@ -47,7 +47,7 @@ openshift-c4ae3a5a28e19ffc930e7c2aa758d85c-provision-eaas-space 22535d8e-d360- $ opc results taskrun list --pipelinerun ---- + -Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit=10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. .Example output of the `opc results taskrun list` command for a pipeline run + From 68bbb3f9eb1cd60e2207b182f2e4de03f895f223 Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:06:58 +0100 Subject: [PATCH 09/11] Update modules/op-results-opc-taskrunlist.adoc Co-authored-by: Divyanshu Agrawal --- modules/op-results-opc-taskrunlist.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-taskrunlist.adoc b/modules/op-results-opc-taskrunlist.adoc index 6dc4f80523a5..166fe99fa912 100644 --- a/modules/op-results-opc-taskrunlist.adoc +++ b/modules/op-results-opc-taskrunlist.adoc @@ -24,7 +24,7 @@ You can use the `opc` utility to view a lists of names and identifiers of task r $ opc results taskrun list -n ---- + -Optionally, specify the `--limit` command line option, for example, `--limit 10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. +Optionally, specify the `--limit` command line option, for example, `--limit=10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. + Optionally, specify the `--labels` parameter, for example, `--labels="app.kubernetes.io/name=test-app, app.kubernetes.io/component=database`. With this setting, the list includes only the task runs that have the specified labels or annotations. + From b9e7d43a7544d4637cb60a95facae6b15964a08d Mon Sep 17 00:00:00 2001 From: Mikhail Ramendik <33361640+mramendi@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:07:13 +0100 Subject: [PATCH 10/11] Update modules/op-results-opc-pipelinerunresults.adoc Co-authored-by: Divyanshu Agrawal --- modules/op-results-opc-pipelinerunresults.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/op-results-opc-pipelinerunresults.adoc b/modules/op-results-opc-pipelinerunresults.adoc index d9d1cffe7a60..b7ce38f849ec 100644 --- a/modules/op-results-opc-pipelinerunresults.adoc +++ b/modules/op-results-opc-pipelinerunresults.adoc @@ -13,7 +13,7 @@ You can use the `opc` utility to view a description of when and how a pipeline r * You installed the `opc` utility. * You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. -* You have the name or UUID of the pipeline run. You can use the `ocp results list pipelineruns` commands to view names and UUIDs of pipelines runs for which results are available. +* You have the name or UUID of the pipeline run. You can use the `ocp results list pipelineruns` commands to view names and UUIDs of pipeline runs for which results are available. .Procedure From 0300d756d583fee3fe713aed515b31c763a78f2d Mon Sep 17 00:00:00 2001 From: Misha Ramendik Date: Tue, 24 Jun 2025 16:02:11 +0100 Subject: [PATCH 11/11] namespace fixes --- modules/op-results-opc-pipelinerunlist.adoc | 4 ++++ modules/op-results-opc-pipelinerunresults.adoc | 17 +++++++++++------ modules/op-results-opc-taskrunlist.adoc | 7 ++++++- modules/op-results-opc-taskrunresults.adoc | 17 +++++++++++------ 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/modules/op-results-opc-pipelinerunlist.adoc b/modules/op-results-opc-pipelinerunlist.adoc index 84909dd8b779..0f78ac6f5de6 100644 --- a/modules/op-results-opc-pipelinerunlist.adoc +++ b/modules/op-results-opc-pipelinerunlist.adoc @@ -53,6 +53,10 @@ The command lists all pipeline runs for pipelines that have names containing `

+$ opc results pipelinerun describe -n ---- + Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun describe --uid +$ opc results pipelinerun describe -n --uid ---- + .Example output of the `opc results pipelinerun describe` command @@ -72,28 +72,28 @@ Pipeline: 2h0m0s + [source,terminal] ---- -$ opc results pipelinerun describe --output yaml +$ opc results pipelinerun describe -n --output yaml ---- + Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun describe --output yaml --uid +$ opc results pipelinerun describe -n --output yaml --uid ---- * To view the logs associated with the pipeline run, enter the following command: + [source,terminal] ---- -$ opc results pipelinerun logs +$ opc results pipelinerun logs -n ---- + Alternatively, you can use the pipeline run UUID instead of the name: + [source,terminal] ---- -$ opc results pipelinerun logs --uid +$ opc results pipelinerun logs -n --uid ---- [IMPORTANT] @@ -101,6 +101,11 @@ $ opc results pipelinerun logs --uid Logs that the `opc results pipelinerun logs` displays do not include logs of task runs that completed within this pipeline runs. To view these logs, find the names of the task runs in this pipeline run using the `opc results taskrun list --pipelinerun` command and specify the name of the pipeline run. Then use the `opc results taskrun log` command to view the logs for the task runs. ==== +[NOTE] +==== +If you do not specify the `-n` option, the `opc` command applies to the current namespace, To set the current namespace, use the `oc project` command. +==== + [NOTE] ==== You can use the short form `opc results pr desc` instead of `opc results pipelinerun describe`. diff --git a/modules/op-results-opc-taskrunlist.adoc b/modules/op-results-opc-taskrunlist.adoc index 166fe99fa912..4b39ba896e6a 100644 --- a/modules/op-results-opc-taskrunlist.adoc +++ b/modules/op-results-opc-taskrunlist.adoc @@ -44,7 +44,7 @@ openshift-c4ae3a5a28e19ffc930e7c2aa758d85c-provision-eaas-space 22535d8e-d360- + [source,terminal] ---- -$ opc results taskrun list --pipelinerun +$ opc results taskrun list --pipelinerun -n ---- + Optionally, specify the `--limit` command line option, for example, `--limit=10`. With this setting, the `opc` command displays the specified number of lines containing pipeline run names and then exits. If you add the `--single-page=false` command line option, the command displays the specified number of lines and then prompts you to continue or quit. @@ -61,6 +61,11 @@ operator-main-index-4-18-on-pull-request-g95fk-validate-fbc fb80d962-807b- operator-main-index-4-18-on-pull-request-g95fk-apply-tags 8a34b46d-74a9-4f20-9e99-a285f7b258d6 16d ago 13s Succeeded ---- +[NOTE] +==== +If you do not specify the `-n` option, the `opc` command applies to the current namespace, To set the current namespace, use the `oc project` command. +==== + [NOTE] ==== You can use the short form `opc results tr list` instead of `opc results taskrun list`. diff --git a/modules/op-results-opc-taskrunresults.adoc b/modules/op-results-opc-taskrunresults.adoc index 9dbb5a9ae812..e96b2d51b04b 100644 --- a/modules/op-results-opc-taskrunresults.adoc +++ b/modules/op-results-opc-taskrunresults.adoc @@ -24,14 +24,14 @@ You can use the `opc` utility to view a description of when and how a task run c + [source,terminal] ---- -$ opc results taskrun describe +$ opc results taskrun describe -n ---- + Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun describe --uid +$ opc results taskrun describe -n --uid ---- + .Example output of the `opc results taskrun describe` command @@ -61,30 +61,35 @@ STARTED DURATION STATUS + [source,terminal] ---- -$ opc results taskrun describe --output yaml +$ opc results taskrun describe -n --output yaml ---- + Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun describe --output yaml --uid +$ opc results taskrun describe -n --output yaml --uid ---- * To view the logs associated with the task run, enter the following command: + [source,terminal] ---- -$ opc results taskrun logs +$ opc results taskrun logs -n ---- + Alternatively, you can use the task run UUID instead of the name: + [source,terminal] ---- -$ opc results taskrun logs --uid +$ opc results taskrun logs -n --uid ---- +[NOTE] +==== +If you do not specify the `-n` option, the `opc` command applies to the current namespace, To set the current namespace, use the `oc project` command. +==== + [NOTE] ==== You can use the short form `opc results tr desc` instead of `opc results taskrun describe`.