Commit 36f7ca7b authored by kewei.jia's avatar kewei.jia

修改 dingtalk

parent 485c1411
...@@ -120,7 +120,7 @@ def update_microservice_qke(namespace, name, image, tier, domain, cluster) { ...@@ -120,7 +120,7 @@ def update_microservice_qke(namespace, name, image, tier, domain, cluster) {
return res_json return res_json
} }
def ding_talk(buildNumber,flags) { def ding_talk(buildNumber,flags,projectName,branchName,) {
dest_url = "http://172.30.220.22:3003/pipeline/dingTalk" dest_url = "http://172.30.220.22:3003/pipeline/dingTalk"
response = httpRequest httpMode:"POST", response = httpRequest httpMode:"POST",
...@@ -132,6 +132,27 @@ def ding_talk(buildNumber,flags) { ...@@ -132,6 +132,27 @@ def ding_talk(buildNumber,flags) {
}""", }""",
url:dest_url url:dest_url
} }
def ding_talk_back(buildNumber,flags,imageId) {
echo "test===========================================================================================test"
echo buildNumber
echo flags
echo projectName
echo branchName
echo messgae
echo imageId
echo gitRepo
dest_url = "http://192.168.29.80:3003/pipeline/dingTalk"
response = httpRequest httpMode:"POST",
consoleLogResponseBody:true,
contentType:"APPLICATION_JSON",
requestBody:"""{
"buildNumber":"${buildNumber}",
"flag":"${flags}",
"imageId":"${imageId}"
}""",
url:dest_url
}
def set_image_info(microservice_name, git_commit_hash, image) { def set_image_info(microservice_name, git_commit_hash, image) {
dest_url = "http://eos.quantgroups.com/api/etcd/set_image_info" dest_url = "http://eos.quantgroups.com/api/etcd/set_image_info"
......
...@@ -12,7 +12,6 @@ def call(body) { ...@@ -12,7 +12,6 @@ def call(body) {
def config = [:] def config = [:]
def timeStemp = new Date().format("yyyyMMddHHmmssSSS") def timeStemp = new Date().format("yyyyMMddHHmmssSSS")
def env = body.env def env = body.env
def gitRepo = env.GIT_REPO def gitRepo = env.GIT_REPO
def originBranchName = env.BRANCH_NAME def originBranchName = env.BRANCH_NAME
...@@ -89,10 +88,12 @@ def call(body) { ...@@ -89,10 +88,12 @@ def call(body) {
_utils.beautyEcho("Clear Cache Tmp", "stage") _utils.beautyEcho("Clear Cache Tmp", "stage")
_stage.clean_images(imageTagInfos[0]["imageTag"],contextDir,config.buildType) _stage.clean_images(imageTagInfos[0]["imageTag"],contextDir,config.buildType)
_stage.ding_talk(buildNumber,"success") _stage.ding_talk(buildNumber,"success")
ding_talk_back(buildNumber,"success",imageTagInfos[0]["imageTag"])
} }
} catch (err) { } catch (err) {
_utils.beautyEcho(err, "fail") _utils.beautyEcho(err, "fail")
_stage.ding_talk(buildNumber,"fail") ding_talk_back(buildNumber,"fail",imageTagInfos[0]["imageTag"])
if(imageTagInfos != null){ if(imageTagInfos != null){
_stage.clean_images(imageTagInfos[0]["imageTag"],contextDir,config.buildType) _stage.clean_images(imageTagInfos[0]["imageTag"],contextDir,config.buildType)
} }
......
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