-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve parameters that are set in the request body or in custom head… #18
Conversation
This feature has been needed for a long time. Thanks for contributing Update: Update2: update3: |
Hm, that's strange. But thank's for the updates, I will have a look at it. |
Hi arkantos1482, Thanks, |
… way as it is done within the URL.
Hi arkantos1482, I've done one more change: Now I noticed the code part where parameters are resolved in the URL (this has been done already). For that, a resolver method of the jenkins core is used. Also, not the original URL is modified, but a new variable is created (maybe that's the reason why the original configuration has been overwritten in my first version). I do it now exactly the same way for the request body (I removed the replacement for custom headers, and could re-do that if the change for the request body works.). Could you please check if this version works fine? Thanks, |
Hi Holger, |
Hi again, Does your comment mean that the changes work fine now? If so, how would be the process to get this as an updated version in my jenkins installation (in the plugins section of Jenkins). Sorry for the maybe stupid questions, but I'm new to Jenkins plugin development. Thanks, |
Hi Holger, regards |
Hi Abbas, Unfortunately, the http calls in the job configuration are not shown any more, and I also can't select this function in the pre or post build steps. I don't think that's related to my changes, but related to the packaging or installation. That leads me to the question how these changes can now be merged to the trunk and provided as a regular update of this plugin? Thanks, |
Hi Holger, I have done the following (trying to create a MCVE):
It replaced the URL and body variables correctly, ❌ but the headers were untouched. See the the job log in pastebin: http://pastebin.com/0zKENMXd As you can see in the XML I am using:
Michael |
Hi Michael, thanks for your effort and the update. So now as it works, I will investigate the headers again and come back with a comment when I think it's done! Best, |
Hello Michael, Thanks, |
Hi Holger, I have just noticed your comment and pulled the changes and rebuilt. ✅ The headers are now replaced correctly (in addition to all the other replacements working fine). Michael |
Hi Michael, Thanks, |
Hi Holger, well the only way you can do that is to ask the maintainers who have write access to master to merge the pull request and release a new version. What I do right now is using your snapshot I built myself in some POCs right now. But I am used to using SNAPSHOTs temporarily (even a few months) in production until there is a released version. The version in the plugin manganement shows that I have built it, the date and the short commit hash I think. On the other hand I don't handle the "production" Jenkins as a real production, I just do a backup in addition to using the JobConfigHistory Plugin and take a shot. This way I can move faster forward since there is still a lot of work to be done. Michael |
Hi, I just saw that it is possible to call the httprequest from the Pipeline. However, if I want to make a POST request with data in the body how can I do that? Thanks! Cris |
Hi Cris, this is the discussion pertaining to the pull request (a proposed change to the plugin) and not a place to ask arbitrary questions. Next time please post questions on StackOverflow so that others may benefit from possible answers. Michael |
Merged. Thanks for the pull request. |
Currently there is no possibility to pass all parameters and a request body to the client.
Use case:
I want to pass the value
D:/jenkins/${Tag}/workspace
in the request body.
There is no possibility to do that, because the parameters are not resolved.
This change will resolve all the parameters within the request body and within custom headers, too.