-
Notifications
You must be signed in to change notification settings - Fork 9
/
Jenkinsfile
36 lines (31 loc) · 1.03 KB
/
Jenkinsfile
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
#!/bin/env groovy
node('ubuntu-docker-gpu') {
def imageName = 'android-emulator'
stage('Checkout') {
checkout scm
}
stage('Build docker image') {
docker.build(imageName, '--build-arg UID=1000 --build-arg GID=1000 .')
}
docker.image(imageName).inside('--privileged') {
stage('Compile') {
// create signing key for build
sh 'mkdir -p ./.android && cp /debug.keystore ./.android/'
sh './gradlew assembleDebug'
}
stage('Test') {
sh 'echo "no" | android create avd -f -n test_a24_armeabi-v7a -t android-24 --abi default/armeabi-v7a'
sh 'ANDROID_SDK_HOME=`pwd` emulator64-arm -avd test_a24_armeabi-v7a -noaudio -no-window -qemu -vnc :0 &'
sh '/bin/bash android-wait-for-emulator.sh'
try {
sh './gradlew connectedDebugAndroidTest'
} finally {
step([
$class: 'JUnitResultArchiver',
allowEmptyResults: false,
testResults: 'jsengine-android/jsengine/build/outputs/androidTest-results/connected/*.xml',
])
}
}
}
}