-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile-Android
50 lines (42 loc) · 1.06 KB
/
Jenkinsfile-Android
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
node {
stage('checkout') {
if (isScmConfigured()) {
checkout scm
} else {
checkout([
$class: 'GitSCM',
branches: [[name: "3.2.0"]],
userRemoteConfigs: [[
url: 'https://github.com/eclipsesource/tabris-js-hello-world.git'
]]
])
}
}
def androidBuildImage
stage('docker image') {
androidBuildImage = docker.build("tabris-js-build-android")
}
androidBuildImage.inside {
stage('info') {
sh 'gradle -v'
sh 'node -v'
sh 'npm -v'
sh 'tabris -V'
sh 'pwd'
sh 'ls -la'
}
stage('npm') {
sh 'npm install'
}
stage('tabris build') {
sh 'tabris build android'
}
stage('archive apk') {
archive '**/*.apk'
}
}
}
private boolean isScmConfigured() {
// if the SCM is not configured, then the branch name is null
return env.BRANCH_NAME;
}