dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Add more rendering options in pipelineRun generatedName

Open caiocampoos opened this issue 1 year ago • 3 comments

Feature request

We want to render links and tags on the pipeline run generated name, currently only working with alphanumeric lowercase and - characters.

Use case

We want to render links and tags to organize better our workflows. Something like Circleci or more custom.

Additional context

Something like this.

Screenshot 2024-02-20 at 12 08 04

caiocampoos avatar Feb 20 '24 15:02 caiocampoos

Hi @caiocampoos, thanks for the feature request. Can you elaborate a bit on what exactly you're trying to do?

It would be really helpful if you could provide an example of the PipelineRun YAML, identify which piece specifically doesn't currently meet your needs, and describe how you expect it to be handled.

AlanGreene avatar Feb 21 '24 07:02 AlanGreene

@AlanGreene of course, thanks for the reply. I am currently trying to add a link to the pull request that trigger the pipeline run, so on tekton dashboard i can easily click a link and go to github on the correct pull request. I could not quite figure it out by the dashboard documentation how to do that, the further i got was just displaying the ref and author of the pr in the pipeline generated name.

- apiVersion: tekton.dev/v1beta1
      kind: PipelineRun
      metadata:
        generateName: pr-$(tt.params.ref)-$(tt.params.author)-
      spec:
        serviceAccountName: service-account-{{ .Values.projectName }}

        pipelineRef:
          name: {{ .Values.projectName}}-pipeline
        workspaces:
          - name: shared-data

I would imagine we could have something like a displayName, that can accept more elaborate html to be rendered in the dashboard.

caiocampoos avatar Feb 21 '24 11:02 caiocampoos

There's currently no displayName support in the PipelineRun resource.

There are both displayName and description fields on Task and Pipeline resources, but not on PipelineRun.

See:

  • https://tekton.dev/docs/pipelines/tasks/#specifying-a-display-name
  • https://tekton.dev/docs/pipelines/tasks/#adding-a-description
  • https://tekton.dev/docs/pipelines/pipelines/#specifying-a-display-name
  • https://tekton.dev/docs/pipelines/pipelines/#adding-a-description

Something like a displayName field would need to be supported by the underlying CRD (PipelineRun in this case) before we could process and display it in the Dashboard.

It might make sense to propose this as an enhancement to Tekton Pipelines. You can find details of the process for proposing new features at https://github.com/tektoncd/community/tree/main/process#proposing-features

It's also worth noting that the Dashboard does currently display information about the EventListener and Trigger if the run was created by Tekton Triggers.

AlanGreene avatar Feb 22 '24 18:02 AlanGreene

Closing as there's currently nothing for the Dashboard to do here. Feel free to propose a TEP as described above to add a display name or similar field to the PipelineRun CRD.

AlanGreene avatar Oct 30 '24 18:10 AlanGreene