diff --git a/Jenkinsfile b/Jenkinsfile index 75d94f66e4c4f95b8e1181d72fbbbb88bb69cb51..3a15e7d667f9d9417663253aa97651bd10ff4d23 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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}" } } }