зеркало из https://github.com/mozilla/hubs.git
Add slack message
This commit is contained in:
Родитель
1ee6d27b13
Коммит
d380df2e4d
|
@ -37,7 +37,24 @@ pipeline {
|
|||
def slackUrl = env.SLACK_URL
|
||||
|
||||
def habCommand = "sudo /usr/bin/hab-docker-studio -k mozillareality run /bin/bash scripts/hab-build-and-push.sh ${baseAssetsPath} ${assetBundleServer} ${targetS3Url}"
|
||||
sh "/usr/bin/script --return -c ${shellString(habCommand)} /dev/null"
|
||||
// sh "/usr/bin/script --return -c ${shellString(habCommand)} /dev/null"
|
||||
|
||||
def gitMessage = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'[%an] %s'").trim()
|
||||
def gitSha = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim()
|
||||
def text = (
|
||||
"*<http://localhost:8080/job/${env.JOB_NAME}/${env.BUILD_NUMBER}|#${env.BUILD_NUMBER}>* *${env.JOB_NAME}* " +
|
||||
"<https://github.com/mozilla/hubs/commit/$gitSha|$gitSha> " +
|
||||
"Hubs: ```${gitSha} ${gitMessage}```\n" +
|
||||
"<https://smoke-hubs.mozilla.com/0zuesf6c6mf/smoke-test?pollForSha=${gitSha}|Smoke Test> - to push:\n" +
|
||||
"`/mr hubs deploy`"
|
||||
)
|
||||
def payload = 'payload=' + JsonOutput.toJson([
|
||||
text : text,
|
||||
channel : "#mr-builds",
|
||||
username : "buildbot",
|
||||
icon_emoji: ":gift:"
|
||||
])
|
||||
sh "curl -X POST --data-urlencode ${shellString(payload)} ${slackURL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче