-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CEL Expression doesn't seem to work with Bitbucket server #1677
Comments
Same issue. Did you find a solution? |
I'm just starting to look into that issue. I'll follow up with updates here. |
No but looks like Emil will look into it :) |
So I tested that and it worked. There are issues with file and path matching from the CEL expression with BitBucket, but that specific case worked. Here is the annotation I've used: Few notes: Second, I'm testing with "Bitbucket Data Center" which is the successor of Bitbucket Server (not supported anymore). Last thing, that error from the log seems suspicions: |
Had the same issue however it works when using Edit: Still getting the issues when trying to check if file has changed with the following cel: I guess this is something that does not work with bitbucket since it seems like the webhook does not contain files changed unlike the github webhook. See here: https://community.atlassian.com/t5/Bitbucket-questions/WebHook-with-file-changes/qaq-p/770231 If this is the case I would suggest updating the documentation with a note that this is not supported for bitbucket |
Hi,
I've been experimenting a bit with Pipelines as Code together with bitbucket-server.
But it doesn't seem to work with CEL-Expression annotation:
...
annotations:
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "master"
...
This is what i observe on the pipeline-as-a-code controller logs
{"level":"info","ts":"2024-05-03T08:13:15.037Z","logger":"pipelinesascode","caller":"bitbucketserver/bitbucketserver.go:174","msg":"Using PipelineRun definition from source pull request SHA: e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED"} {"level":"info","ts":"2024-05-03T08:13:15.607Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:133","msg":"matching pipelineruns to event: URL=https://REDACTED/projects/REDACTED/repos/REDACTED.REDACTED, target-branch=refs/heads/master, source-branch=refs/heads/master, target-event=push","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED"} {"level":"error","ts":"2024-05-03T08:13:15.607Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:172","msg":"there was an error evaluating the CEL expression, skipping: json: cannot unmarshal string into Go value of type map[string]interface {}","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED","stacktrace":"github.com/openshift-pipelines/pipelines-as-code/pkg/matcher.MatchPipelinerunByAnnotation\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/matcher/annotation_matcher.go:172\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).getPipelineRunsFromRepo\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:195\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/matc... {"level":"warn","ts":"2024-05-03T08:13:15.607Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:200","msg":"cannot match pipeline from payload to a pipelinerun in .tekton/ dir","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED"} {"level":"warn","ts":"2024-05-03T08:13:15.607Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:201","msg":"payload target event is with source branch refs/heads/master and target branch master","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED"} {"level":"warn","ts":"2024-05-03T08:13:15.607Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:202","msg":"available configuration of the PipelineRuns annotations in .tekton/ dir","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED"} {"level":"warn","ts":"2024-05-03T08:13:15.607Z","logger":"pipelinesascode","caller":"events/emit.go:50","msg":"cannot match pipeline from payload to a pipelinerun in .tekton/ dir, event=, branch=master","provider":"bitbucket-server","event-id":"cc7d5e22-ef40-4575-bd18-d9eb4a10cd70","event-sha":"e516130c8cf654f321c0b0ac7b4011c9ad4b3bd9","event-type":"","namespace":"REDACTED"}
The text was updated successfully, but these errors were encountered: