mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-26 00:19:44 +00:00
use separate jobs for e2e builds, disable aborting for non-pr builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
94022523a1
commit
3acc480428
@ -40,13 +40,13 @@ pipeline {
|
|||||||
ios = cmn.buildBranch('status-react/combined/mobile-ios')
|
ios = cmn.buildBranch('status-react/combined/mobile-ios')
|
||||||
} } }
|
} } }
|
||||||
stage('iOS e2e') { steps { script {
|
stage('iOS e2e') { steps { script {
|
||||||
iose2e = cmn.buildBranch('status-react/combined/mobile-ios', 'e2e')
|
iose2e = cmn.buildBranch('status-react/combined/mobile-ios-e2e')
|
||||||
} } }
|
} } }
|
||||||
stage('Android') { steps { script {
|
stage('Android') { steps { script {
|
||||||
apk = cmn.buildBranch('status-react/combined/mobile-android')
|
apk = cmn.buildBranch('status-react/combined/mobile-android')
|
||||||
} } }
|
} } }
|
||||||
stage('Android e2e') { steps { script {
|
stage('Android e2e') { steps { script {
|
||||||
apke2e = cmn.buildBranch('status-react/combined/mobile-android', 'e2e')
|
apke2e = cmn.buildBranch('status-react/combined/mobile-android-e2e')
|
||||||
} } }
|
} } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ pipeline {
|
|||||||
options {
|
options {
|
||||||
timestamps()
|
timestamps()
|
||||||
/* Prevent Jenkins jobs from running forever */
|
/* Prevent Jenkins jobs from running forever */
|
||||||
timeout(time: 35, unit: 'MINUTES')
|
timeout(time: 40, unit: 'MINUTES')
|
||||||
/* Limit builds retained */
|
/* Limit builds retained */
|
||||||
buildDiscarder(logRotator(
|
buildDiscarder(logRotator(
|
||||||
numToKeepStr: '10',
|
numToKeepStr: '10',
|
||||||
|
@ -34,13 +34,18 @@ def getBuildType() {
|
|||||||
|
|
||||||
@NonCPS
|
@NonCPS
|
||||||
def abortPreviousRunningBuilds() {
|
def abortPreviousRunningBuilds() {
|
||||||
|
/* Aborting makes sense only for PR builds, since devs start so many of them */
|
||||||
|
if (!env.JOB_NAME.contains('status-react/prs')) {
|
||||||
|
println ">> Not aborting any previous jobs. Not a PR build."
|
||||||
|
return
|
||||||
|
}
|
||||||
Run previousBuild = currentBuild.rawBuild.getPreviousBuildInProgress()
|
Run previousBuild = currentBuild.rawBuild.getPreviousBuildInProgress()
|
||||||
|
|
||||||
while (previousBuild != null) {
|
while (previousBuild != null) {
|
||||||
if (previousBuild.isInProgress()) {
|
if (previousBuild.isInProgress()) {
|
||||||
def executor = previousBuild.getExecutor()
|
def executor = previousBuild.getExecutor()
|
||||||
if (executor != null) {
|
if (executor != null) {
|
||||||
echo ">> Aborting older build #${previousBuild.number}"
|
println ">> Aborting older build #${previousBuild.number}"
|
||||||
executor.interrupt(Result.ABORTED, new UserInterruption(
|
executor.interrupt(Result.ABORTED, new UserInterruption(
|
||||||
"newer build #${currentBuild.number}"
|
"newer build #${currentBuild.number}"
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user