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
410 stars 160 forks source link

how to invoke global env variable (branch name) into Optional filter expression #315

Open radhikavelaga-aisera opened 3 months ago

radhikavelaga-aisera commented 3 months ago

Explain your issue

I am trying to setup a build job with generic-webhook-trigger-plugin and i want to trigger build only if branch matches(branch name will change periodically and branch name will set at global level ). how to invoke global env variable (branch name) into Optional filter expression?

I am trying to like this but not working

Expression - ^(refs/heads/${env.release-branch-name})*?

Screenshot 2024-06-27 at 12 42 20 AM

tomasbjerre commented 3 months ago

Can probably be solved by defining the configuration in a pipeline or job dsl, see readme.

radhikavelaga-aisera commented 3 months ago

Can probably be solved by defining the configuration in a pipeline or job dsl, see readme.

Thank you for quick reply. If i take that path, i would need to change 50 jenkinsfile hence looking for an option in job config which is in my control.