fix edge case where PR e2e builds are not rebased
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
ee52ceffa3
commit
6a90d76c98
|
@ -71,7 +71,7 @@ def extractArchFromAPK(name) {
|
||||||
if (matches.size() > 0) {
|
if (matches.size() > 0) {
|
||||||
return matches[0][1]
|
return matches[0][1]
|
||||||
}
|
}
|
||||||
if (utils.getBuildType() == 'e2e') {
|
if (utils.isE2EBuild()) {
|
||||||
return 'x86'
|
return 'x86'
|
||||||
}
|
}
|
||||||
/* non-release builds make universal APKs */
|
/* non-release builds make universal APKs */
|
||||||
|
|
|
@ -70,7 +70,7 @@ def uploadArtifact(path) {
|
||||||
def domain = 'ams3.digitaloceanspaces.com'
|
def domain = 'ams3.digitaloceanspaces.com'
|
||||||
def bucket = 'status-im'
|
def bucket = 'status-im'
|
||||||
/* There's so many PR builds we need a separate bucket */
|
/* There's so many PR builds we need a separate bucket */
|
||||||
if (utils.getBuildType() == 'pr') {
|
if (utils.isPRBuild()) {
|
||||||
bucket = 'status-im-prs'
|
bucket = 'status-im-prs'
|
||||||
}
|
}
|
||||||
/* WARNING: s3cmd can't guess APK MIME content-type */
|
/* WARNING: s3cmd can't guess APK MIME content-type */
|
||||||
|
|
|
@ -19,7 +19,7 @@ def buildObj(success) {
|
||||||
id: env.BUILD_DISPLAY_NAME,
|
id: env.BUILD_DISPLAY_NAME,
|
||||||
commit: GIT_COMMIT.take(8),
|
commit: GIT_COMMIT.take(8),
|
||||||
success: success != null ? success : true,
|
success: success != null ? success : true,
|
||||||
platform: env.TARGET + (utils.getBuildType() == 'e2e' ? '-e2e' : ''),
|
platform: env.TARGET + (utils.isE2EBuild() ? '-e2e' : ''),
|
||||||
duration: utils.buildDuration(),
|
duration: utils.buildDuration(),
|
||||||
url: currentBuild.absoluteUrl,
|
url: currentBuild.absoluteUrl,
|
||||||
pkg_url: pkg_url,
|
pkg_url: pkg_url,
|
||||||
|
|
|
@ -60,7 +60,7 @@ def notifyPRFailure() {
|
||||||
def notifyPRSuccess() {
|
def notifyPRSuccess() {
|
||||||
def d = ":small_blue_diamond:"
|
def d = ":small_blue_diamond:"
|
||||||
def msg = "#### :heavy_check_mark: "
|
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 += "[${env.JOB_NAME}${currentBuild.displayName}](${currentBuild.absoluteUrl}) ${d} "
|
||||||
msg += "${ghcmgr.utils.buildDuration()} ${d} ${GIT_COMMIT.take(8)} ${d} "
|
msg += "${ghcmgr.utils.buildDuration()} ${d} ${GIT_COMMIT.take(8)} ${d} "
|
||||||
msg += "[:package: ${env.TARGET}${type} package](${env.PKG_URL})"
|
msg += "[:package: ${env.TARGET}${type} package](${env.PKG_URL})"
|
||||||
|
|
|
@ -31,7 +31,7 @@ def pkgFilename(type, ext, arch=null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
def doGitRebase() {
|
def doGitRebase() {
|
||||||
if (getBuildType() != 'pr') {
|
if (!isPRBuild()) {
|
||||||
println 'Skipping rebase due for non-PR build...'
|
println 'Skipping rebase due for non-PR build...'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -93,12 +93,20 @@ def pkgFind(glob) {
|
||||||
return found[0].path
|
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 getBuildType() {
|
||||||
def jobName = env.JOB_NAME
|
def jobName = env.JOB_NAME
|
||||||
if (jobName.contains('e2e')) {
|
if (isE2EBuild()) {
|
||||||
return 'e2e'
|
return 'e2e'
|
||||||
}
|
}
|
||||||
if (jobName.startsWith('status-react/prs')) {
|
if (isPRBuild()) {
|
||||||
return 'pr'
|
return 'pr'
|
||||||
}
|
}
|
||||||
if (jobName.startsWith('status-react/nightly')) {
|
if (jobName.startsWith('status-react/nightly')) {
|
||||||
|
|
Loading…
Reference in New Issue