Comments (6)
Here is a working example of that: https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/sandbox/sandbox.jenkinsfile
from generic-webhook-trigger-plugin.
It's working now. Thanks!
from generic-webhook-trigger-plugin.
no problem!
from generic-webhook-trigger-plugin.
@tomasbjerre
im trying the environment variable substitution on a declarative pipeline but it doesnt seem to work any suggestions?
regexpFilterText: '$ref $changed_files $commit_user',
regexpFilterExpression: "^refs/heads/${env.BRANCH_NAME}\\s(.*\"(${params.BRAND}\\/params.yml).*\"|.*\"(${params.BRAND}\\/.*\\.properties).*\")[^\\s]+?\\s((?!${env.GIT_USER}))"
The variable are part of environment{} in the pipeline template.
from generic-webhook-trigger-plugin.
You should open a new issue about that. And explain how you are using the plugin so that there is something to investigate.
from generic-webhook-trigger-plugin.
I am trying to set a dynamic filter based on the repo and the job name (we use same Jenkinsfile in all the repos) with following settings:
regexpFilterText: '$repo',
regexpFilterExpression: '/${env.JOB_NAME}.split("/")[1]/g'The
$repo is correctly set to the repo name e.g. template-service and I want to match it with the repo name in the job e.g. ORG/template-service/master. Even with this filter, the webhook is triggering all the jobs. I tried changing '$ {env.JOB_NAME}' to 'env.JOB_NAME' but that does not work either. Is it possible to use environment variables in regexpFilterExpression? Why is this filter triggering all the jobs?
@ajaypandit can you share the code
It's working now. Thanks!
@ajaypandit Could you please share your worked code? I have the similar issue. Thanks so much.
from generic-webhook-trigger-plugin.
Related Issues (20)
- Performance is slow for large installations HOT 18
- Getting no POST body in the Jenkins job HOT 2
- Same setting works in staging jenkins and doesn't work in Prod jenkins HOT 2
- Running sh without filling in a value for Post content parameters will blocking HOT 1
- Sometimes multiple variable contributions is shown HOT 3
- How can I get the raw json body? HOT 11
- GWT 1.88.1 breaks Jenkins job HOT 2
- groovy.lang.MissingPropertyException: No such property HOT 1
- Plugin does not accept Github token scheme HOT 7
- Reload trigger configuration from scm HOT 5
- Buildcause no longer detected since Jenkins update? HOT 3
- Not compatible with the "Trigger builds remotely" configuration option HOT 2
- The JSON response is not shown in Jenkins log, even if it is configured to be shown HOT 4
- Link is dead HOT 1
- Expose request JSON payload as an object in a variable
- All branches are triggered instead of one specific HOT 6
- Failed to invoke the trigger and get 500 error code HOT 1
- Generic Webhook trigger plugin and webhook configuration HOT 3
- Add a way to test a webhook is triggered but doesn't actually run the job (dry run) HOT 3
- Internal error (Error 500) HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generic-webhook-trigger-plugin.