Skip to content

Add pipelines in application explorer#4749

Merged
vrubezhny merged 3 commits intomainfrom
4484-show-openshift-pipeline-tasks-in-cluster-view-in-the-application-explorer
Jan 30, 2025
Merged

Add pipelines in application explorer#4749
vrubezhny merged 3 commits intomainfrom
4484-show-openshift-pipeline-tasks-in-cluster-view-in-the-application-explorer

Conversation

@msivasubramaniaan
Copy link
Copy Markdown
Collaborator

@msivasubramaniaan msivasubramaniaan commented Jan 8, 2025

Displayed list of pipeline task into application explorer

image

Copy link
Copy Markdown
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the notes.

Comment thread src/explorer.ts
const namespace: string = await Oc.Instance.getActiveProject();
const collections: OtherObject[] = await Oc.Instance.getKubernetesObjects(element.kind, namespace, undefined, this.executionContext);
const taskNames: PipelineTasks[] = [];
const tasks = collections[0].spec.tasks;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On clean (just created, not having any deployments) Sandbox account I'm receiving the following error:

Cannot read properties of undefined (reading 'spec')

That's probably happening while going through this line of code

Copy link
Copy Markdown
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

A pipeline task is shown on the tree:
image

@vrubezhny vrubezhny merged commit de192d0 into main Jan 30, 2025
@vrubezhny
Copy link
Copy Markdown
Contributor

@msivasubramaniaan As far as I understand, we can trigger a pipeline task using a PipelineRun resource.

And we can see the results of task run with oc get pipelinerun, like:

$ oc get pipelinerun
NAME                 SUCCEEDED   REASON   STARTTIME   COMPLETIONTIME
simple-pipelinerun   False       Failed   60s         33s

Then, once triggered, we can describe the run with oc describe pipelinerun simple-pipelinerun, like:

$ oc describe pipelinerun simple-pipelinerun
Name:         simple-pipelinerun
Namespace:    vrubezhny-dev
Labels:       tekton.dev/pipeline=simple-pipeline
Annotations:  <none>
API Version:  tekton.dev/v1
Kind:         PipelineRun
Metadata:
 Creation Timestamp:  2025-01-30T17:16:16Z
 Generation:          1
 Resource Version:    218950132
 UID:                 0c1783c0-9c54-4db5-8004-e89fce813e99
Spec:
 Pipeline Ref:
   Name:  simple-pipeline
 Task Run Template:
   Service Account Name:  pipeline
 Timeouts:
   Pipeline:  1h0m0s
Status:
 Child References:
   API Version:         tekton.dev/v1
   Kind:                TaskRun
   Name:                simple-pipelinerun-build
   Pipeline Task Name:  build
 Completion Time:       2025-01-30T17:16:43Z
 Conditions:
   Last Transition Time:  2025-01-30T17:16:43Z
   Message:               Tasks Completed: 1 (Failed: 1, Cancelled 0), Skipped: 0
   Reason:                Failed
   Status:                False
   Type:                  Succeeded
 Pipeline Spec:
   Tasks:
     Name:  build
     Task Ref:
       Kind:  Task
       Name:  build-task
 Provenance:
   Feature Flags:
     Await Sidecar Readiness:                true
     Coschedule:                             workspaces
     Disable Affinity Assistant:             true
     Disable Creds Init:                     false
     Disable Inline Spec:                    
     Enable API Fields:                      stable
     Enable Artifacts:                       false
     Enable CEL In When Expression:          false
     Enable Concise Resolver Syntax:         false
     Enable Keep Pod On Cancel:              false
     Enable Kubernetes Sidecar:              false
     Enable Param Enum:                      false
     Enable Provenance In Status:            true
     Enable Step Actions:                    true
     Enforce Nonfalsifiability:              none
     Max Result Size:                        4096
     Require Git SSH Secret Known Hosts:     false
     Result Extraction Method:               termination-message
     Running In Env With Injected Sidecars:  true
     Send Cloud Events For Runs:             false
     Set Security Context:                   false
     Verification No Match Policy:           ignore
 Start Time:                                 2025-01-30T17:16:16Z
Events:
 Type     Reason   Age   From         Message
 ----     ------   ----  ----         -------
 Normal   Started  90s   PipelineRun  
 Normal   Running  90s   PipelineRun  Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0
 Warning  Failed   63s   PipelineRun  Tasks Completed: 1 (Failed: 1, Cancelled 0), Skipped: 0

@msivasubramaniaan Do you think we should show the pipeline task runs some way on the tree (or somehow through the pipeline task context menu) and allow displaying a pipeline task run description?

@adietish adietish deleted the 4484-show-openshift-pipeline-tasks-in-cluster-view-in-the-application-explorer branch February 6, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show OpenShift Pipeline Tasks in Cluster View in the Application Explorer

2 participants