Skip to content

Commit

Permalink
fix which APK is published for e2e builds
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Oct 1, 2019
1 parent 9f6db66 commit 599ed98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
8 changes: 6 additions & 2 deletions ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,19 @@ pipeline {
script {
def urls = apks.collect { cmn.utils.uploadArtifact(it) }
/* return only the universal APK */
env.PKG_URL = urls.find { it.contains('universal') }
if (urls.size() > 1) {
env.PKG_URL = urls.find { it.contains('universal') }
} else { /* if no universal is available pick first */
env.PKG_URL = urls.first()
}
/* build type specific */
switch (btype) {
case 'release':
android.uploadToPlayStore(); break;
case 'nightly':
env.DIAWI_URL = android.uploadToDiawi(); break;
case 'e2e':
env.SAUCE_URL = android.uploadToSauceLabs()
env.SAUCE_URL = android.uploadToSauceLabs(); break;
}
}
}
Expand Down
9 changes: 7 additions & 2 deletions ci/android.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ def bundle() {
switch (btype) {
case 'e2e':
env.ANDROID_ABI_INCLUDE="x86" /* e2e builds are used with simulators */
break
case 'release':
env.ANDROID_ABI_SPLIT="true"
gradleOpt += "-PreleaseVersion='${utils.getVersion()}'"
break
}

/* credentials necessary to open the keystore and sign the APK */
Expand Down Expand Up @@ -69,6 +71,9 @@ def extractArchFromAPK(name) {
if (matches.size() > 0) {
return matches[0][1]
}
if (utils.getBuildType() == 'e2e') {
return 'x86'
}
/* non-release builds make universal APKs */
return 'universal'
}
Expand All @@ -82,7 +87,7 @@ def renameAPKs() {
def apkGlob = 'result/*.apk'
def found = findFiles(glob: apkGlob)
if (found.size() == 0) {
error("APKs not found via glob: ${apkGlob}")
throw "APKs not found via glob: ${apkGlob}"
}
def renamed = []
/* rename each for upload & archiving */
Expand Down Expand Up @@ -113,7 +118,7 @@ def uploadToSauceLabs() {
if (changeId != null) {
env.SAUCE_LABS_NAME = "${changeId}.apk"
} else {
def pkg = utils.pkgFilename(utils.getBuildType(), 'apk')
def pkg = utils.pkgFilename(utils.getBuildType(), 'apk', 'x86')
env.SAUCE_LABS_NAME = "${pkg}"
}
withCredentials([
Expand Down
2 changes: 1 addition & 1 deletion ci/ghcmgr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def postBuild(success) {
/* We're not using --fail because it suppresses server response */
if (!stdout.contains('HTTP_CODE:201')) {
println("STDOUT:\n${stdout}")
error("Notifying GHCMGR failed with: TODO")
error("Notifying GHCMGR failed")
}
}

Expand Down

0 comments on commit 599ed98

Please sign in to comment.