Pass Jenkins Log File to the a web service

时间:2017-07-10 15:24:03

标签: jenkins jenkins-plugins hudson-plugins hudson-api

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 个答案:

答案 0 :(得分:0)

你想把它传给哪里? IS ssh可用吗?如果它是你可以ssh到Web服务器并复制该文件作为您的jenkins脚本的一部分。

OR

要做一个http帖子,请使用此插件。

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