apk name is a PR number if build for a PR
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
789a905743
commit
edd58af80b
|
@ -38,7 +38,12 @@ def uploadToPlayStore() {
|
|||
}
|
||||
|
||||
def uploadToSauceLabs() {
|
||||
env.SAUCE_LABS_APK = "im.status.ethereum-e2e-${GIT_COMMIT.take(6)}.apk"
|
||||
def changeId = common.getParentRunEnv('CHANGE_ID')
|
||||
if (changeId != null) {
|
||||
env.SAUCE_LABS_APK = "${changeId}.apk"
|
||||
} else {
|
||||
env.SAUCE_LABS_APK = "im.status.ethereum-e2e-${GIT_COMMIT.take(6)}.apk"
|
||||
}
|
||||
withCredentials([
|
||||
string(credentialsId: 'SAUCE_ACCESS_KEY', variable: 'SAUCE_ACCESS_KEY'),
|
||||
string(credentialsId: 'SAUCE_USERNAME', variable: 'SAUCE_USERNAME'),
|
||||
|
|
|
@ -151,4 +151,10 @@ def githubNotify(apkUrl, e2eUrl, ipaUrl, dmgUrl, appUrl, changeId) {
|
|||
}
|
||||
}
|
||||
|
||||
def getParentRunEnv(name) {
|
||||
def c = currentBuild.rawBuild.getCause(hudson.model.Cause$UpstreamCause)
|
||||
if (c == null) { return null }
|
||||
return c.getUpstreamRun().getEnvironment()[name]
|
||||
}
|
||||
|
||||
return this
|
||||
|
|
Loading…
Reference in New Issue