q-shift / qshift-templates

Backstage templates for the Qshift demo
Apache License 2.0
1 stars 3 forks source link

PipelineRun name is not unique #37

Closed cmoulliard closed 4 months ago

cmoulliard commented 4 months ago

Issue

The PipelineRun name is not unique when we populate the resource using the helm chart

// source: https://github.com/q-shift/qshift-templates/blob/main/qshift/templates/quarkus-application/manifests/helm/build-test-push/templates/03-pipelinerun-quarkus-build-test-push.yaml

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: quarkus-build-test-push
  namespace: {{ .Values.app.namespace }}
  labels:
    {{- include "backstage.labels" . | nindent 4 }}

By consequence, it is not possible within a namespace to create several quarkus applications

cmoulliard commented 4 months ago

Remark: If we use generateName instead of name then argocd sucks: https://github.com/argoproj/argo-cd/issues/1639.

So, we should instead use as ID the componentID to name the pipelineRun

cmoulliard commented 4 months ago

I did a test successfully using as new name name: {{ .Values.app.name }}-build-test-push

Screenshot 2024-03-05 at 12 10 59 Screenshot 2024-03-05 at 12 10 48 Screenshot 2024-03-05 at 12 10 12 Screenshot 2024-03-05 at 12 28 18