pullrequest 升级后自动条用sonar分析
This commit is contained in:
parent
d40d33740f
commit
6cc039aceb
|
@ -162,12 +162,22 @@ class PullRequestsController < ApplicationController
|
|||
path = "./"
|
||||
# qa = QualityAnalysis.where(:project_id => @project.id, :author_login => user_name).first
|
||||
version = 1
|
||||
properties = "sonar.projectKey=#{job_name}
|
||||
if language == "java"
|
||||
properties = "sonar.projectKey=#{job_name}
|
||||
sonar.projectName=#{job_name}
|
||||
sonar.projectVersion=#{version}
|
||||
sonar.sources=#{path}
|
||||
sonar.language=#{language.downcase}
|
||||
sonar.sourceEncoding=utf-8
|
||||
sonar.java.binaries=./"
|
||||
else
|
||||
properties = "sonar.projectKey=#{job_name}
|
||||
sonar.projectName=#{job_name}
|
||||
sonar.projectVersion=#{version}
|
||||
sonar.sources=#{path}
|
||||
sonar.language=#{language.downcase}
|
||||
sonar.sourceEncoding=utf-8"
|
||||
end
|
||||
|
||||
# 替换配置文件
|
||||
@doc = Nokogiri::XML(File.open(File.join(Rails.root, 'tmp', 'config.xml')))
|
||||
|
|
Loading…
Reference in New Issue