This commit is contained in:
huang 2018-06-10 21:18:15 +08:00
parent 631d1084a6
commit 654d735f8c
2 changed files with 21 additions and 1 deletions

View File

@ -219,7 +219,9 @@ class PullRequestsController < ApplicationController
# connect jenkins
client_jenkins = JenkinsApi::Client.new(:server_url => jenkins_address, :username => jenkins_username, :password => jenkins_password)
@output = client_jenkins.job.get_console_output("#{job_name}", build_num = 0, start = 0, mode = 'html')["output"]
@output2 = client_jenkins.job.get_console_output("#{job_name}", build_num = 0, start = 0, mode = 'text')["output"]
@output2 = @output.gsub("\r\n", "\n")
@output3 = @output.gsub("\r", "\n")
@output4 = @output.gsub("\r", "")
logger.info("jenkins ###########################{@output}")
logger.info("jenkins 1111111111111111111111111##{@output2}")
end

View File

@ -2,4 +2,22 @@
<div class="clear">
<%= @output.html_safe %>
</div>
</div>
22222222222222
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output2.html_safe %>
</div>
</div>
33333333333333
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output3.html_safe %>
</div>
</div>
4444444444445
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output4.html_safe %>
</div>
</div>