|
| 1 | +// This module is included in the following assembly: |
| 2 | +// |
| 3 | +// * records/using-tekton-results-for-openshift-pipelines-observability.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="results-opc-pipelinerunresults_{context}"] |
| 7 | += Viewing result information for a pipeline run |
| 8 | + |
| 9 | +[role="_abstract"] |
| 10 | +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. |
| 11 | + |
| 12 | +.Prerequisites |
| 13 | + |
| 14 | +* You installed the `opc` utility. |
| 15 | +* You configured the `opc` utility to query results from {tekton-results} by pipeline run and task run names. |
| 16 | +* 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. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +* Use any of the following commands to view the result information for a pipeline run: |
| 21 | +** To view a description of when and how the pipeline run completed, enter the following command: |
| 22 | ++ |
| 23 | +[source,terminal] |
| 24 | +---- |
| 25 | +$ opc results pipelinerun describe -n <namespace_name> <pipelinerun_name> |
| 26 | +---- |
| 27 | ++ |
| 28 | +Alternatively, you can use the pipeline run UUID instead of the name: |
| 29 | ++ |
| 30 | +[source,terminal] |
| 31 | +---- |
| 32 | +$ opc results pipelinerun describe -n <namespace_name> --uid <pipelinerun_uuid> |
| 33 | +---- |
| 34 | ++ |
| 35 | +.Example output of the `opc results pipelinerun describe` command |
| 36 | +[source,terminal] |
| 37 | +---- |
| 38 | +Name: operator-main-index-4-18-on-pull-request-7kssl |
| 39 | +Namespace: tekton-ecosystem-tenant |
| 40 | +Service Account: appstudio-pipeline |
| 41 | +Labels: |
| 42 | + app.kubernetes.io/managed-by=pipelinesascode.tekton.dev |
| 43 | + app.kubernetes.io/version=v0.33.0 |
| 44 | +Annotations: |
| 45 | + appstudio.openshift.io/snapshot=openshift-pipelines-main-b7jj6 |
| 46 | + build.appstudio.openshift.io/repo=https://github.com/openshift-pipelines/operator?rev=ba5e62e51af0c88bc6c3fd4201e789bdfc093daa |
| 47 | +
|
| 48 | +📌 Status |
| 49 | +STARTED DURATION STATUS |
| 50 | +27d ago 9m54s Succeeded |
| 51 | + |
| 52 | +⏱ Timeouts |
| 53 | +Pipeline: 2h0m0s |
| 54 | + |
| 55 | +⚓ Params |
| 56 | + NAME VALUE |
| 57 | + • git-url https://github.com/pramodbindal/operator |
| 58 | + • revision ba5e62e51af0c88bc6c3fd4201e789bdfc093daa |
| 59 | + |
| 60 | +🗂 Workspaces |
| 61 | + NAME SUB PATH WORKSPACE BINDING |
| 62 | + • workspace --- VolumeClaimTemplate |
| 63 | + • git-auth --- Secret (secret=pac-gitauth-ceqzjt) |
| 64 | + |
| 65 | +📦 Taskruns |
| 66 | + NAME TASK NAME |
| 67 | + • operator-main-index-4-18-on-pull-request-7kssl-init init |
| 68 | + • operator-main-index-4-18-on-pull-request-7kssl-clone-repository clone-repository |
| 69 | +---- |
| 70 | + |
| 71 | +* To view the full YAML manifest of the pipeline run, enter the following command: |
| 72 | ++ |
| 73 | +[source,terminal] |
| 74 | +---- |
| 75 | +$ opc results pipelinerun describe -n <namespace_name> --output yaml <pipelinerun_name> |
| 76 | +---- |
| 77 | ++ |
| 78 | +Alternatively, you can use the pipeline run UUID instead of the name: |
| 79 | ++ |
| 80 | +[source,terminal] |
| 81 | +---- |
| 82 | +$ opc results pipelinerun describe -n <namespace_name> --output yaml --uid <pipelinerun_uuid> |
| 83 | +---- |
| 84 | +
|
| 85 | +* To view the logs associated with the pipeline run, enter the following command: |
| 86 | ++ |
| 87 | +[source,terminal] |
| 88 | +---- |
| 89 | +$ opc results pipelinerun logs -n <namespace_name> <pipelinerun_name> |
| 90 | +---- |
| 91 | ++ |
| 92 | +Alternatively, you can use the pipeline run UUID instead of the name: |
| 93 | ++ |
| 94 | +[source,terminal] |
| 95 | +---- |
| 96 | +$ opc results pipelinerun logs -n <namespace_name> --uid <pipelinerun_uuid> |
| 97 | +---- |
| 98 | +
|
| 99 | +[IMPORTANT] |
| 100 | +==== |
| 101 | +Logs that the `opc results pipelinerun logs` displays do not include logs of task runs that completed within this pipeline run. 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. |
| 102 | +==== |
0 commit comments