Comments (9)
Here is an example that triggers if the user is not "jenkins":
from generic-webhook-trigger-plugin.
Weird, if i use ^((?!BUILD_USER))$ it does not work.
If i use ^((?!BUILD_USER).)*$ it works.
What is the diference ?
My variable contains ACTOR = "MY_NAME"
Logging:
Triggering GenericTrigger [genericVariables=[GenericVariable [expressionType=JSONPath, key=ID, value=$.pullRequest.id, regexpFilter=], GenericVariable [expressionType=JSONPath, key=ACTOR, value=$.actor.name, regexpFilter=]], regexpFilterText=$ACTOR, regexpFilterExpression=^((?!iBUILD_USER))$, genericRequestVariables=null]
Mar 22, 2018 11:28:20 AM INFO org.jenkinsci.plugins.gwt.GenericTrigger isMatching
Not triggering "^((?!iBUILD_USER))$" not matching "My_NAME".
Thanks in advance.
from generic-webhook-trigger-plugin.
Forgot to mention, the plugin version is 1.10 on Jenkins 2.60.1
from generic-webhook-trigger-plugin.
Perhaps remove the $
at the end of regexp or move it inside the parenthesis.
from generic-webhook-trigger-plugin.
So you are saying that if I set the username of the user committing to "Jenkins" it will ignore it and skip the build????, if so, that is exactly the behavior I am trying to achieve.
from generic-webhook-trigger-plugin.
It is all about the json string. if "set the username of the user " means you change the json being sent, then yes.
You should continue this discussion in the issue you originally created. Closing this one as the reporter dos not respond.
from generic-webhook-trigger-plugin.
Hi, due to courses and work i was not able to answer in time. It seems that ^((?!BUILD_USER).)*$ is the only thing that works for me. Have tried different notations also the one 'hidden' in your code but i can not get that notation to work. This solution is fine for me at this moment. Thanks for the support.
Kl@@s
from generic-webhook-trigger-plugin.
I added a test case for this. If someone needs it in the future:
https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd/github/github-push-trigger-unless-specific-user.feature
from generic-webhook-trigger-plugin.
Thanks for the quick support, keep up the good work!
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.