-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
62 lines (52 loc) · 1.38 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
pipeline {
agent none
environment {
ANDROID_SDK_ROOT = '/usr/lib/android-sdk'
}
stages {
stage('Checkout scm') {
agent {
label 'build app node'
}
steps {
checkout scm
}
}
stage('Build') {
agent {
label 'build app node'
}
steps {
echo 'build app'
sh './gradlew clean assembleDebug --no-daemon'
stash name: 'app', includes: '**', excludes: '**/.gradle/,**/.git/**'
}
}
stage('OnFarmTest') {
agent {
label 'build test node'
}
environment {
PATH = "/home/ubuntu/DevTools/stf-console-client-0.3.4/bin:$PATH"
}
steps {
echo "PATH is: $PATH"
echo 'test app'
unstash 'app'
sh 'pwd'
sh 'stf'
sh 'stf devices --all'
sh 'sleep 5'
sh 'stf connect --all &'
sh 'sleep 5'
sh 'adb devices'
sh './gradlew connectedAndroidTest --no-daemon'
}
post {
always {
junit '**/debugAndroidTest/**'
}
}
}
}
}