Core CI integration (building Mail as part of Core CI pipeline)
This commit is contained in:
parent
6aba12c78c
commit
0662240030
|
@ -4,6 +4,10 @@ before_script:
|
|||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||
- export VERSION_NAME=$(grep -E "versionName " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
||||
- export VERSION_CODE=$(grep -E "versionCode " buildSrc/src/main/kotlin/ProtonMail.kt | awk '{print $5}' | sed s/\"//g)
|
||||
- !reference [.checkout-core-submodule, before_script] # included from checkout-core.gitlab-ci.yml
|
||||
|
||||
variables:
|
||||
ORG_GRADLE_PROJECT_useCoreGitSubmodule: "false" # see included checkout-core.gitlab-ci.yml for usage context
|
||||
|
||||
image: ${CI_REGISTRY}/android/shared/docker-android:v1.0.0
|
||||
|
||||
|
@ -27,6 +31,7 @@ stages:
|
|||
|
||||
detekt analysis:
|
||||
stage: analyze
|
||||
extends: .checkout_core_submodule_job
|
||||
tags:
|
||||
- large
|
||||
except:
|
||||
|
@ -42,6 +47,7 @@ detekt analysis:
|
|||
|
||||
build debug:
|
||||
stage: build
|
||||
extends: .checkout_core_submodule_job
|
||||
tags:
|
||||
- xlarge-k8s
|
||||
script:
|
||||
|
@ -54,6 +60,7 @@ build debug:
|
|||
|
||||
build uiAutomation:
|
||||
stage: build
|
||||
extends: .checkout_core_submodule_job
|
||||
tags:
|
||||
- xlarge-k8s
|
||||
script:
|
||||
|
@ -66,6 +73,7 @@ build uiAutomation:
|
|||
|
||||
build alpha:
|
||||
stage: build
|
||||
extends: .checkout_core_submodule_job
|
||||
when: 'manual'
|
||||
only:
|
||||
- develop
|
||||
|
@ -81,6 +89,7 @@ build alpha:
|
|||
|
||||
build release:
|
||||
stage: build
|
||||
extends: .checkout_core_submodule_job
|
||||
except:
|
||||
- schedules
|
||||
only:
|
||||
|
@ -99,8 +108,9 @@ build release:
|
|||
|
||||
unit tests:
|
||||
stage: test
|
||||
extends: .checkout_core_submodule_job
|
||||
tags:
|
||||
- large
|
||||
- xlarge-k8s
|
||||
script:
|
||||
- ./gradlew -Pci --console=plain allTest
|
||||
|
||||
|
@ -222,6 +232,10 @@ include:
|
|||
ref: development
|
||||
file: '/appetize-integration.yml'
|
||||
|
||||
- project: 'proton/mobile/android/proton-libs'
|
||||
ref: main
|
||||
file: '/ci/templates/checkout-core.gitlab-ci.yml'
|
||||
|
||||
|
||||
startReview:
|
||||
before_script:
|
||||
|
|
|
@ -28,14 +28,17 @@ println("Modules: ${modules.sorted().joinToString()}")
|
|||
for (p in projects) includeBuild(p)
|
||||
for (m in modules) include(m)
|
||||
|
||||
// Use core libs from maven artifacts or submodules (see gradle.properties).
|
||||
val useCoreGitSubmoduleAsBoolean: Boolean = extensions.extraProperties
|
||||
.properties["useCoreGitSubmodule"].toString().toBoolean()
|
||||
if (useCoreGitSubmoduleAsBoolean) {
|
||||
println("Use core libs from git submodule \'./proton-libs\'")
|
||||
// Use core libs from maven artifacts or from git submodule using Gradle's included build:
|
||||
// - to enable/disable locally: gradle.properties > useCoreGitSubmodule
|
||||
// - to enable/disable on CI: .gitlab-ci.yml > ORG_GRADLE_PROJECT_useCoreGitSubmodule
|
||||
val coreSubmoduleDir = rootDir.resolve("proton-libs")
|
||||
extra.set("coreSubmoduleDir", coreSubmoduleDir)
|
||||
val includeCoreLibsHelper = File(coreSubmoduleDir, "gradle/include-core-libs.gradle.kts")
|
||||
if (includeCoreLibsHelper.exists()) {
|
||||
apply(from = "${coreSubmoduleDir.path}/gradle/include-core-libs.gradle.kts")
|
||||
} else if (extensions.extraProperties["useCoreGitSubmodule"].toString().toBoolean()) {
|
||||
includeBuild("proton-libs")
|
||||
} else {
|
||||
println("Use core libs from Maven artifacts")
|
||||
println("Core libs from git submodule `$coreSubmoduleDir`")
|
||||
}
|
||||
|
||||
pluginManagement {
|
||||
|
|
Loading…
Reference in New Issue