-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
Description of problem:
According to the documentation, using the header and body of the payload for CEL-based filtering with Pipelines as Code is a Technology Preview feature only.
Accessing arrays does not work in a PipelineRun like in the given example below.
Steps to Reproduce
# Install a latest release of OpenShift Pipelines
- Create a pipeline run and access an Array from the body like below
apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: generateName: "metrics-checker-release-{{sender}}-" annotations: pipelinesascode.tekton.dev/on-cel-expression: | event == "push" && target_branch == "abc-pac-test" && body.actor.name == "abc" pipelinesascode.tekton.dev/pipeline: ".tekton/pipelines/python-build-deploy.yaml" pipelinesascode.tekton.dev/max-keep-runs: "3" spec: serviceAccountName: pipeline pipelineRef: name: python-build-deploy podTemplate: nodeSelector: node-role.kubernetes.io/infra: "" tolerations: - key: infra effect: NoExecute value: reserved params: - name: git-url value: "{{body.changes[0].ref.id}}" - name: git-revision value: "{{target_branch}}" workspaces: - name: source-app volumeClaimTemplate: spec: accessModes: - ReadWriteMany resources: requests: storage: 1Gi storageClassName: hnas-nfs-csi-sc
Actual results:
The param git-url is set as `body.changes[0].ref.id`
Expected results:
The param git-url is parsed from the body and set properly
Reproducibility (Always/Intermittent/Only Once):
Always
Acceptance criteria:
Body and header getting parsed
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):