fix edge case where PR e2e builds are not rebased

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-01-13 13:15:33 +01:00
parent ee52ceffa3
commit 6a90d76c98
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
5 changed files with 15 additions and 7 deletions

View File

@ -71,7 +71,7 @@ def extractArchFromAPK(name) {
if (matches.size() > 0) {
return matches[0][1]
}
if (utils.getBuildType() == 'e2e') {
if (utils.isE2EBuild()) {
return 'x86'
}
/* non-release builds make universal APKs */

View File

@ -70,7 +70,7 @@ def uploadArtifact(path) {
def domain = 'ams3.digitaloceanspaces.com'
def bucket = 'status-im'
/* There's so many PR builds we need a separate bucket */
if (utils.getBuildType() == 'pr') {
if (utils.isPRBuild()) {
bucket = 'status-im-prs'
}
/* WARNING: s3cmd can't guess APK MIME content-type */

View File

@ -19,7 +19,7 @@ def buildObj(success) {
id: env.BUILD_DISPLAY_NAME,
commit: GIT_COMMIT.take(8),
success: success != null ? success : true,
platform: env.TARGET + (utils.getBuildType() == 'e2e' ? '-e2e' : ''),
platform: env.TARGET + (utils.isE2EBuild() ? '-e2e' : ''),
duration: utils.buildDuration(),
url: currentBuild.absoluteUrl,
pkg_url: pkg_url,

View File

@ -60,7 +60,7 @@ def notifyPRFailure() {
def notifyPRSuccess() {
def d = ":small_blue_diamond:"
def msg = "#### :heavy_check_mark: "
def type = ghcmgr.utils.getBuildType() == 'e2e' ? ' e2e' : ''
def type = ghcmgr.utils.isE2EBuild() ? ' e2e' : ''
msg += "[${env.JOB_NAME}${currentBuild.displayName}](${currentBuild.absoluteUrl}) ${d} "
msg += "${ghcmgr.utils.buildDuration()} ${d} ${GIT_COMMIT.take(8)} ${d} "
msg += "[:package: ${env.TARGET}${type} package](${env.PKG_URL})"

View File

@ -31,7 +31,7 @@ def pkgFilename(type, ext, arch=null) {
}
def doGitRebase() {
if (getBuildType() != 'pr') {
if (!isPRBuild()) {
println 'Skipping rebase due for non-PR build...'
return
}
@ -93,12 +93,20 @@ def pkgFind(glob) {
return found[0].path
}
def isPRBuild() {
return env.JOB_NAME.startsWith('status-react/prs')
}
def isE2EBuild() {
return env.JOB_NAME.contains('e2e')
}
def getBuildType() {
def jobName = env.JOB_NAME
if (jobName.contains('e2e')) {
if (isE2EBuild()) {
return 'e2e'
}
if (jobName.startsWith('status-react/prs')) {
if (isPRBuild()) {
return 'pr'
}
if (jobName.startsWith('status-react/nightly')) {