jenkins地址写入配置文件
This commit is contained in:
parent
69d35b347d
commit
ac641f64c4
|
@ -148,10 +148,10 @@ class ChallengesController < ApplicationController
|
|||
taskId = params[:id]
|
||||
jobName = @shixun.forked_form
|
||||
step = @challenge.position
|
||||
|
||||
jenkins_shixuns = Redmine::Configuration['jenkins_shixuns']
|
||||
if @challenge.status == 0
|
||||
params = {:jobName => "#{jobName}", :taskId => "#{taskId}", :step => "#{step}", :gitUrl => "#{gitUrl}"}
|
||||
uri = URI.parse("http://123.59.135.74:9999/jenkins-exec/api/buildJob")
|
||||
uri = URI("#{jenkins_shixuns}/jenkins-exec/api/buildJob")
|
||||
res = uri_exec uri, params
|
||||
# @challenge.update_attribute(:status, 1)
|
||||
end
|
||||
|
|
|
@ -99,9 +99,10 @@ class GamesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
jenkins_shixuns = Redmine::Configuration['jenkins_shixuns']
|
||||
step = @game.stage
|
||||
params = {:jobName => "#{jobName}", :taskId => "#{taskId}", :step => "#{step}", :gitUrl => "#{gitUrl}", :testCode => "#{testCode}"}
|
||||
uri = URI.parse("http://123.59.135.74:9999/jenkins-exec/api/buildJob")
|
||||
uri = URI("#{jenkins_shixuns}/jenkins-exec/api/buildJob")
|
||||
res = uri_exec uri, params
|
||||
render :json => {data:"success"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue