This commit is contained in:
huang 2018-06-10 21:26:21 +08:00
parent 654d735f8c
commit 9e2070235f
2 changed files with 39 additions and 3 deletions

View File

@ -219,9 +219,15 @@ 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 = @output.gsub("\r\n", "\n")
@output3 = @output.gsub("\r", "\n")
@output4 = @output.gsub("\r", "")
@output2 = @output.gsub("\n", "\r\n")
@output2 = @output.gsub("\n", "\r")
@output3 = @output.gsub("\r\n", "\n")
@output4 = @output.gsub("\r\n", "\r")
@output5 = @output.gsub("\r", "\n")
@output6 = @output.gsub("\r", "\r\n")
@output7 = @output.gsub("\t", "\t\n")
@output8 = @output.gsub("\t", "\n")
@output9 = @output.gsub("\t", "\r")
logger.info("jenkins ###########################{@output}")
logger.info("jenkins 1111111111111111111111111##{@output2}")
end

View File

@ -20,4 +20,34 @@
<div class="clear">
<%= @output4.html_safe %>
</div>
</div>
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output5.html_safe %>
</div>
</div>
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output6.html_safe %>
</div>
</div>
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output6.html_safe %>
</div>
</div>
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output4.html_safe %>
</div>
</div>
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output8.html_safe %>
</div>
</div>
<div class="clear new_roadmap_listbox">
<div class="clear">
<%= @output9.html_safe %>
</div>
</div>