job
This commit is contained in:
parent
f2a13540a2
commit
8270344794
|
@ -32,7 +32,7 @@ class QualityAnalysisController < ApplicationController
|
|||
projects_date = open(@sonar_address + "/api/projects/index").read
|
||||
arr = JSON.parse(projects_date).map {|m| m["nm"]} # eg: ["Hjqreturn:cc_rep", "Hjqreturn:putong", "Hjqreturn:sonar_rep2", "shitou:sonar_rep"]
|
||||
quality_an = QualityAnalysis.where(:sonar_name => sonar_name).first
|
||||
if @client_jenkins.jobdd.exists?(job_name) && QualityAnalysis.where(:sonar_name => sonar_name).select{|qa| arr.include?(qa.sonar_name)}.blank?
|
||||
if @client_jenkins.job.exists?(job_name) && QualityAnalysis.where(:sonar_name => sonar_name).select{|qa| arr.include?(qa.sonar_name)}.blank?
|
||||
aa = @client_jenkins.job.delete("#{job_name}")
|
||||
quality_an.delete unless quality_an.blank?
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue