I've a Jenkin Job which I want to trigger remotely, which should take file as a input.
Directory of file: C:\Users\PrashantGuptaC\Documents
File Name: file.txt
The postman post request seems success, but there are no parameters shown in jenkin job. I'm not sure where it's going wrong.
I'm completely new with Jenkins, so any suggestion would be Welcome.
via curl below is the example. like this, you can use any tool like this approach
Syntex
curl JENKINS_URL/job/JOB_NAME/buildWithParameters \
--user USER:PASSWORD \
--form FILE_LOCATION_AS_SET_IN_JENKINS=@PATH_TO_FILE
Example I have a file parameter in Jenkins
http://localhost:8080/job/test/buildWithParameters \
--user $JENKINS_USER:$JENKINS_TOKEN \
--form file=@/home/XYZ/m/myfile.yml
Note - @
is needed, after that the file absolute path.
and from the postman, it will be like. Make sure you use Basic Auth and use Jenkins user and token in it.