Commit 5b26900b authored by wentao.suo's avatar wentao.suo

fff

parent 090c6ef1
...@@ -29,7 +29,7 @@ def sonaar_check(GIT_REPO_NAME,GIT_BRANCH,currentPath){ ...@@ -29,7 +29,7 @@ def sonaar_check(GIT_REPO_NAME,GIT_BRANCH,currentPath){
} }
def callback_pipes(taskId) { def callback_pipes(callbackHost ,taskId) {
sleep 3 sleep 3
sonarInfo = sh (script: 'cat .sonar/report-task.txt |awk \'{printf $0 "&"}\'',returnStdout: true).trim() sonarInfo = sh (script: 'cat .sonar/report-task.txt |awk \'{printf $0 "&"}\'',returnStdout: true).trim()
...@@ -49,13 +49,13 @@ def callback_pipes(taskId) { ...@@ -49,13 +49,13 @@ def callback_pipes(taskId) {
def bodyJson = JsonOutput.toJson(body) def bodyJson = JsonOutput.toJson(body)
echo bodyJson echo bodyJson
dest_url = "http://pipes-default.q-gp.com/callback/ci/triger"
response = httpRequest httpMode:"POST", response = httpRequest httpMode:"POST",
consoleLogResponseBody:true, consoleLogResponseBody:true,
contentType:"APPLICATION_JSON", contentType:"APPLICATION_JSON",
requestBody:"${bodyJson}", requestBody:"${bodyJson}",
url:dest_url url:callbackHost
/* def res_json = jsonParse(response.content) /* def res_json = jsonParse(response.content)
return res_json*/ return res_json*/
......
...@@ -8,14 +8,21 @@ def call(body) { ...@@ -8,14 +8,21 @@ def call(body) {
def GIT_BRANCH_HASH = env.GIT_BRANCH_HASH def GIT_BRANCH_HASH = env.GIT_BRANCH_HASH
def GIT_TRIGER_USER = env.GIT_TRIGER_USER def GIT_TRIGER_USER = env.GIT_TRIGER_USER
def TASK_INDEX = env.TASK_INDEX def TASK_INDEX = env.TASK_INDEX
def callbackHost = "http://pipes-default.q-gp.com/callback/ci/triger"
def currentPath def currentPath
/*body.resolveStrategy = Closure.DELEGATE_FIRST body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config body.delegate = config
body()*/ body()
if(config.callbackHost != null){
callbackHost = config.callbackHost
}
ansiColor('xterm') { ansiColor('xterm') {
echo "\033[32m############################################\n\ echo "\033[32m############################################\n\
...@@ -36,7 +43,7 @@ echo "\033[32m############################################\n\ ...@@ -36,7 +43,7 @@ echo "\033[32m############################################\n\
} }
stage("callback"){ stage("callback"){
_stage.callback_pipes(TASK_INDEX) _stage.callback_pipes(callbackHost,TASK_INDEX)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment