build apk for e2e tests, trigger end-to-end-tests/status-app-nightly job
Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com> Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
ab968dba0e
commit
beb7cd2b84
|
@ -72,7 +72,7 @@ timeout(90) {
|
|||
sh ('ls -la ' + artifact_dir)
|
||||
def artifact = (artifact_dir + 'app-release.apk')
|
||||
def server = Artifactory.server('artifacts')
|
||||
def shortCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(6)
|
||||
shortCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(6)
|
||||
def filename = 'im.status.ethereum-' + shortCommit + '-rel' + '.apk'
|
||||
def newArtifact = (artifact_dir + filename)
|
||||
sh ('mv ' + artifact + ' ' + newArtifact)
|
||||
|
@ -113,5 +113,28 @@ timeout(90) {
|
|||
def c = (testPassed ? 'good' : 'warning' )
|
||||
slackSend color: c, message: 'Release build \nTests: ' + (testPassed ? ':+1:' : ':-1:') + ')\nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl
|
||||
}
|
||||
|
||||
stage('Build (Android) for e2e tests') {
|
||||
sh 'cd android && mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/app-release.original.apk && ENVFILE=.env.e2e ./gradlew assembleRelease'
|
||||
}
|
||||
|
||||
stage('Upload apk for e2e tests') {
|
||||
withCredentials([string(credentialsId: 'SAUCE_ACCESS_KEY', variable: 'key'), string(credentialsId: 'SAUCE_USERNAME', variable: 'username')]){
|
||||
apk_name = 'release-e2e-' + shortCommit + '.apk'
|
||||
sh('curl -u ' + username+ ':' + key + ' -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/' + username + '/' + apk_name + '?overwrite=true --data-binary @android/app/build/outputs/apk/release/app-release.apk')
|
||||
}
|
||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/release/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||
sh 'sleep 10'
|
||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||
testApkUrl = 'https://i.diawi.com/' + hash
|
||||
sh ('echo ARTIFACT Android for e2e tests: ' + testApkUrl)
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run extended e2e tests') {
|
||||
build job: 'end-to-end-tests/status-app-nightly', parameters: [string(name: 'apk', value: '--apk=' + apk_name)], wait: false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue