Uploaded image for project: 'Docs for Red Hat Developers'
  1. Docs for Red Hat Developers
  2. RHDEVDOCS-6418

Doc Error - configure filter in Custom parameter expansion of Repo CR shows an incorrect way of defining filter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • Pipelines 1.18
    • OpenShift Pipelines
    • None

      Openshift Doc  [1]suggests to add the filter as an array to custom parameter expansion of Repo CR:

      spec:
        params:
          - name: company
            value: "ABC Company"
            filter:
              - name: event
                value: |
            pac.event_type == "pull_request"

      However this doesn;t work and throws an error:

      Error "Invalid value: "array": spec.params[0].filter in body must be of type string: "array"" for field "spec.params[0].filter".

      The upstream doc [2] shows the correct way to define the filter in repository CR as a string:

       

      {{}}

      spec: 
        params: 
          - name: company 
            value: "My Beautiful Company" 
            filter: pac.event_type == "pull_request"

      {{}} [1]https://docs.redhat.com/en/documentation/red_hat_openshift_pipelines/1.18/html/pipelines_as_code/using-repository-crd#op-custom-parameter-expansion_using-repository-crd

      [2] https://pipelinesascode.com/docs/guide/customparams/#custom-parameters

              mramendi Mikhail Ramendik
              rhn-support-gio Ginilekshmi A O (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: