jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
404 stars 159 forks source link

Job not triggered but response looks good #231

Closed jjaaxx44 closed 2 years ago

jjaaxx44 commented 2 years ago

I have simple branch variable with $.pullrequest.destination.branch.name JSONPath

When my PR merges and webhook request shows below response, where "triggered": false HTTP status: 200 { "jobs": { "Test": { "regexpFilterExpression": "$branch", "triggered": false, "resolvedVariables": { "branch": "fl" }, "regexpFilterText": "fl", "id": 0, "url": "" } }, "message": "Triggered jobs." }

I'm not sure what is going wrong, Optional filter has "$branch" and filter Text has "fl". and above response shows the intended result from the request but build does not trigger

tomasbjerre commented 2 years ago

Looks like you should switch values of regexpFilterExpression regexpFilterText. So that regexpFilterText is $branch.

jjaaxx44 commented 2 years ago

Thanks man, that was funny ha ha. I wasted 2hrs of my weekend on this :(