-
Notifications
You must be signed in to change notification settings - Fork 2
/
jenkins-continuous.groovy
42 lines (34 loc) · 1.92 KB
/
jenkins-continuous.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@Library('pipeline-library') _
abis = ['armeabi-v7a']
// Sets up the environment to build Android projects.
node("android-build-jdk8") {
stage('Checkout SCM') { checkout scm }
stage('Compile Library') {
sh './gradlew :library:assembleRelease'
archiveArtifacts '**/*.aar'
}
stage('Compile Application') {
withCredentials([
file(credentialsId: 'keystoreFileAndroid', variable: 'KEYSTORE_FILE'),
string(credentialsId: 'keystorePasswordAndroid', variable: 'KEYSTORE_PASSWORD'),
string(credentialsId: 'keystoreAliasSample', variable: 'KEYSTORE_ALIAS'),
string(credentialsId: 'aliasPasswordSample', variable: 'ALIAS_PASSWORD'),
string(credentialsId: 'fastDownwardFirebaseProjectID', variable: 'fastDownwardFirebaseProjectID'),
string(credentialsId: 'fastDownwardFirebaseGoogleAppID', variable: 'fastDownwardFirebaseGoogleAppID'),
string(credentialsId: 'fastDownwardFirebaseWebClientID', variable: 'fastDownwardFirebaseWebClientID'),
string(credentialsId: 'fastDownwardFirebaseGCMSenderID', variable: 'fastDownwardFirebaseGCMSenderID'),
string(credentialsId: 'fastDownwardFirebaseGoogleAPIKey', variable: 'fastDownwardFirebaseGoogleAPIKey'),
string(credentialsId: 'fastDownwardFirebaseCrashlyticsAPIKey', variable: 'fastDownwardFirebaseCrashlyticsAPIKey'),
]) {
for (abi in abis) {
echo "Compiling app for ($abi)..."
sh "./gradlew :app:assembleRelease -PABIS=$abi"
// KLUDGE: by building it twice, we make sure the asset python-modules.zip is found
echo "Recompiling app for ($abi)..."
sh "./gradlew :app:assembleRelease -PABIS=$abi"
echo "Archiving app for ($abi)..."
archiveArtifacts "**/*-$abi-*.apk"
}
}
}
}