Fix Slack messages for builds.

1) Fill in apkUrl where needed so it is not empty;
2) Remove unused variables.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Igor Mandrigin 2018-08-16 11:46:42 +02:00
parent 854acebb70
commit e8ab892e95
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
5 changed files with 6 additions and 16 deletions

View File

@ -30,7 +30,6 @@ timeout(90) {
def apkUrl = '' def apkUrl = ''
def testApkUrl = '' def testApkUrl = ''
def ipaUrl = '' def ipaUrl = ''
def testPassed = true
def version def version
def build_no def build_no
@ -170,8 +169,7 @@ timeout(90) {
} }
stage('Slack Notification') { stage('Slack Notification') {
def c = (testPassed ? 'good' : 'warning' ) slackSend color: 'good', message: 'Nightly build (develop) \nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl + '\n Android for e2e: ' + testApkUrl
slackSend color: c, message: 'Nightly build (develop) \nTests: ' + (testPassed ? ':+1:' : ':-1:') + ')\nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl + '\n Android for e2e: ' + testApkUrl
} }
stage('Run extended e2e tests') { stage('Run extended e2e tests') {

View File

@ -21,7 +21,6 @@ timeout(90) {
node ('fastlane') { node ('fastlane') {
def apkUrl = '' def apkUrl = ''
def ipaUrl = '' def ipaUrl = ''
def testPassed = true
def branch; def branch;
load "$HOME/env.groovy" load "$HOME/env.groovy"
@ -80,6 +79,8 @@ timeout(90) {
string(credentialsId: 'SLACK_JENKINS_WEBHOOK', variable: 'SLACK_URL') string(credentialsId: 'SLACK_JENKINS_WEBHOOK', variable: 'SLACK_URL')
]) { ]) {
sh 'fastlane android upload_diawi' sh 'fastlane android upload_diawi'
apkUrl = readFile "${env.WORKSPACE}/fastlane/diawi.out"
} }
} }
@ -112,9 +113,8 @@ timeout(90) {
} }
stage('Slack Notification') { stage('Slack Notification') {
def c = (testPassed ? 'good' : 'warning' )
slackSend( slackSend(
color: c, color: 'good',
message: "Branch: ${REPO}:${BRANCH_NAME}\nAndroid: ${apkUrl}\niOS: ${ipaUrl}" message: "Branch: ${REPO}:${BRANCH_NAME}\nAndroid: ${apkUrl}\niOS: ${ipaUrl}"
) )
} }

View File

@ -23,7 +23,6 @@ timeout(90) {
node ('fastlane'){ node ('fastlane'){
def apkUrl = '' def apkUrl = ''
def ipaUrl = '' def ipaUrl = ''
def testPassed = true
def version def version
def build_no def build_no
@ -127,8 +126,7 @@ timeout(90) {
} }
stage('Slack Notification') { stage('Slack Notification') {
def c = (testPassed ? 'good' : 'warning' ) slackSend color: 'good', message: 'Release build \nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl
slackSend color: c, message: 'Release build \nTests: ' + (testPassed ? ':+1:' : ':-1:') + ')\nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl
} }
stage('Build (Android) for e2e tests') { stage('Build (Android) for e2e tests') {

View File

@ -20,10 +20,7 @@ def installJSDeps() {
} }
timeout(90) { timeout(90) {
node ('macos'){ node ('fastlane'){
def apkUrl = ''
def ipaUrl = ''
def testPassed = true
def version def version
def build_no def build_no

View File

@ -21,9 +21,6 @@ def installJSDeps() {
timeout(90) { timeout(90) {
node ('fastlane'){ node ('fastlane'){
def apkUrl = ''
def ipaUrl = ''
def testPassed = true
def version def version
def build_no def build_no