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

Pipeline not triggered when `on-cel-expression` is used for `event=push` and `target_branch=main`

XMLWordPrintable

    • Pipelines Sprint 232, Pipelines Sprint 233, Pipelines Sprint 234, Pipelines Sprint 235, Pipelines Sprint 236

      Description of problem:

      Given this annotation:

          pipelinesascode.tekton.dev/on-cel-expression: |
            event == "push" && target_branch == "main" && "backend/***".pathChanged()
      

      I would expect the pipline to be triggered everytime some PR is merged to main branch, where files changed are on the `backend/***` path. This does not seem to work with PaC 1.5

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

      Openshift 4.11
      Openshift Pipelines 1.8.2
      PaC 1.5.0

      Steps to Reproduce

      1. Create Pipelinerun with `on-cel-expression` from the "Description of problem" secion in your Github repo.
      2. Create Repository CR in your cluster with PaC installed
      3. Merge some PR in your test repo

      Actual results:

      PipelineRun does not get created

      Expected results:

      PipelineRun does is created.

      Reproducibility (Always/Intermittent/Only Once):

      Allways

      Build Details:

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

      • Repo & pipelinerun, where I discovered this bug: https://github.com/redhat-appstudio/quality-dashboard/blob/main/.tekton/push-backend.yaml
      • Commit that should have triggered the pipeline: https://github.com/redhat-appstudio/quality-dashboard/commit/762bbfceee955805ded3d2819434aeb95eff25a9
      • Webhook payload that was sent when the commit was pushed: https://pastebin.com/icXsh54G
      • Relevant part of the log from the PaC controller:
        {"severity":"INFO","timestamp":"2023-01-11T11:01:29.011984985Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:127","message":"matching pipelineruns to event: URL=https://github.com/redhat-appstudio/quality-dashboard, target-branch=refs/heads/main, source-branch=refs/heads/main, target-event=push","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012339961Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:170","message":"CEL expression is not matching dashboard-backend-on-pull-request-, skipping","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012511286Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:170","message":"CEL expression is not matching dashboard-frontend-on-pull-request-, skipping","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012666502Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:170","message":"CEL expression is not matching dashboard-backend-on-push-, skipping","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012824877Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:170","message":"CEL expression is not matching dashboard-frontend-on-push-, skipping","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012839706Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:194","message":"could not find a match to a pipelinerun matching payload: hint: check your yaml files are correct","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012848736Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:195","message":"available configuration in pipelineRuns annotations","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        {"severity":"WARNING","timestamp":"2023-01-11T11:01:29.012858282Z","logger":"pipelinesascode","caller":"events/emit.go:49","message":"cannot match pipeline from webhook to pipelineruns on event=push, branch=refs/heads/main","commit":"fdfd333","provider":"github","event-id":"4b317cfa-919f-11ed-8f35-a810228d7d5e","event-sha":"762bbfceee955805ded3d2819434aeb95eff25a9","event-type":"push"}
        

              sashture Savita .
              rhopp@redhat.com Radim Hopp
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: