Comments (6)
Released in 1.22.
To just use the expression $
and there will be a variable containing all JSON.
Open issue again if not working.
from generic-webhook-trigger-plugin.
Thanks tomasbjerre for quick reply,
I tried Version 1.23:
Used $ in expression, but didnt see any contributing variables.
Thanks,
Anil
from generic-webhook-trigger-plugin.
from generic-webhook-trigger-plugin.
Hi Tomas,
Thanks for quick reply.
Curl Command like below:
curl -u "admin:admin" -H "Content-Type: application/json" -X POST -d '{
"search_name":"Test",
"owner": "service_virtual_infrastructure",
"result": {
"event_time": "Oct 9 15:04",
},
"test": "Test"
}' http://localhost:8080/generic-webhook-trigger/invoke?token=ulnet_remediation
Jenkins Job Configuration like below:
Variable test
Expression $
Thanks,
Anil
from generic-webhook-trigger-plugin.
You have some invalid characters and an extra ,
at the end of the line event_time
.
This works for me:
curl -u "admin:admin" -H "Content-Type: application/json" -X POST -d '{
"search_name": "Test",
"owner": "service_virtual_infrastructure",
"result": {
"event_time": "Oct 9 15:04"
},
"test": "Test"
}' http://localhost:8080/generic-webhook-trigger/invoke?token=ulnet_remediation
In the log I see:
GenericWebhookEnvironmentContributor Received:
{
"search_name": "Test",
"owner": "service_virtual_infrastructure",
"result": {
"event_time": "Oct 9 15:04"
},
"test": "Test"
}
Contributing variables:
test_search_name = Test
test = {"search_name":"Test","owner":"service_virtual_infrastructure","result":{"event_time":"Oct 9 15:04"},"test":"Test"}
test_result_event_time = Oct 9 15:04
test_owner = service_virtual_infrastructure
test_test = Test
from generic-webhook-trigger-plugin.
Thanks Much Tomas,
It worked after correcting the input Json as per your suggestion.
Appreciate your help.
I see same log message:
{
"search_name": "Test",
"owner": "service_virtual_infrastructure",
"result": {
"event_time": "Oct 9 15:04"
},
"test": "Test"
}
Contributing variables:
test_search_name = Test
test = {"search_name":"Test","owner":"service_virtual_infrastructure","result":{"event_time":"Oct 9 15:04"},"test":"Test"}
test_result_event_time = Oct 9 15:04
test_owner = service_virtual_infrastructure
test_test = Test
from generic-webhook-trigger-plugin.
Related Issues (20)
- 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
- A token was supplied.\nIf you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE\nIf you are not using a token HOT 7
- When jenkins pipeline fails the input value of the Token field gets empty. HOT 1
- Multiplying triggers HOT 1
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.