Pass Jenkins Log File to the a web service

161 Views Asked by At

I am working on a requirement I need to pass the log file of the job to a web service after the build step

I would like to know

  1. What are the plugins available to call a web service after the build which would facilitate me to pass the log file.

I am getting the path of the log file using:

$JENKINS_HOME/jobs/$JOB_NAME/builds/${BUILD_NUMBER}/log

how to send the contents of it via HTTP Post

1

There are 1 best solutions below

1
Derek Lawrence On

Where are you trying to pass it? IS ssh available? IF it is you could ssh into the web server and copy the file as part of your jenkins script.

OR

To do a http post use this plugin.

https://wiki.jenkins.io/display/JENKINS/HTTP+POST+Plugin