Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-4329

Pipelines does not pass correctly parameters to taskRuns when using resolver

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • Tekton Pipelines
    • None
    • False
    • None
    • False
    • Pipelines Sprint 260

      Description of problem:
      When I try to run this PipelineRun which is using resolver:

      apiVersion: tekton.dev/v1
      kind: PipelineRun
      metadata:     
          generateName: windows11-installer-run-
      spec:     
          params:       
              - name: winImageDownloadURL
                value: <URL>
              - name: baseDVNamespace
                value: some-namespace
          pipelineRef:         
              params:         
              -   name: catalog
                  value: redhat-pipelines
              -   name: type
                  value: artifact
              -   name: kind
                  value: pipeline
              -   name: name
                  value: windows-efi-installer
              -   name: version
                  value: 4.15.0
              resolver: hub
          taskRunSpecs: 
          -   pipelineTaskName: modify-windows-iso-file
              podTemplate: 
                  securityContext: 
                      fsGroup: 107
                      runAsGroup: 107
                      runAsUser: 107
      

      (Pipeline can be found here: https://artifacthub.io/packages/tekton-pipeline/redhat-pipelines/windows-efi-installer, source code here: https://github.com/kubevirt/kubevirt-tekton-tasks/blob/main/release/pipelines/windows-efi-installer/windows-efi-installer.yaml)
      The OCP Pipelines does not correctly pass the parameters from PipelineRun to TaskRuns.
      Notice the baseDVNamespace parameter. It should be passed to this task: https://github.com/kubevirt/kubevirt-tekton-tasks/blob/main/release/pipelines/windows-efi-installer/windows-efi-installer.yaml#L244. That means https://github.com/kubevirt/kubevirt-tekton-tasks/blob/main/release/pipelines/windows-efi-installer/windows-efi-installer.yaml#L259 should have value some-namespace. Instead it has the default value defined in pipeline manifest https://github.com/kubevirt/kubevirt-tekton-tasks/blob/main/release/pipelines/windows-efi-installer/windows-efi-installer.yaml#L59

      Yamls of PipelineRun and affected TaskRun are attached to this bug

      Prerequisites (if any, like setup, operators/versions):

      Red Hat OpenShift Pipelines 1.14.2
      OpenShift 4.15, 4.14

      Steps to Reproduce

      Deploy OpenShift Pipelines operator
      Deploy OpenShift Virtualization operator
      Create PipelineRun posted above (insert into winImageDownloadURL link to Windows 11 iso - can be retrieved from https://www.microsoft.com/software-download/windows11, it has to be Windows 11 (multi-edition ISO for x64 devices), English (United States) otherwise the pipeline will not work)
      I can help with setting up the env.

      Actual results:

      Pipeline uses default value of parameter instead of passed parameter from PipelineRun

      Expected results:

      Pipeline use parameter from PipelineRun.

      Reproducibility (Always/Intermittent/Only Once): Always

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

            vdemeest Vincent Demeester
            ksimon@redhat.com Karel Simon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: