-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathJenkinsfile
84 lines (74 loc) · 2.12 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
node('ios') {
stage('Checkout SCM') {
checkout scm
}
try {
stage ('iOS test') {
sh "tests/scripts/copy_ios_resources.sh"
sh "scripts/update_iosSDK_version.sh ."
sh "cd src/ios && pod repo update && pod install && xcodebuild test -workspace SitumCordovaPlugin.xcworkspace -scheme CordovaLib -destination 'platform=iOS Simulator,name=iPhone 7,OS=11.2'"
}
} finally {
stage('clean repo') {
sh "tests/scripts/self-destruct.sh"
}
}
}
node('androidci') {
stage('Checkout SCM') {
checkout scm
}
stage('Clean Android'){
sh "cd src/android && ./gradlew clean"
}
try {
stage('Android test') {
sh "tests/scripts/copy_android_resources.sh"
sh "cd src/android && ./gradlew test --continue"
}
} finally {
stage('Publish tests') {
junit 'src/android/app/build/test-results/*/*.xml'
}
stage('clean repo') {
sh "tests/scripts/self-destruct.sh"
}
}
}
node('vm1-docker') {
stage('Checkout SCM') {
checkout scm
}
try {
stage('JS test') {
def kubectl = docker.image('node:11.12-slim')
kubectl.pull()
kubectl.inside("-u 0") {
sh "npm install"
sh "npm test"
}
}
stage('Generate JSDoc') {
def kubectl = docker.image('node:11.12-slim')
kubectl.pull()
kubectl.inside() {
sh "npm run jsdoc"
}
}
stage('Archive artifacts'){
def kubectl = docker.image('node:11.12-slim')
kubectl.inside("-u 0") {
sh "apt-get update && apt-get --assume-yes install zip"
sh "zip -r JSDoc ./docs/JSDoc/*"
archiveArtifacts "JSDoc.zip"
}
}
} finally {
stage('Clean repo'){
def kubectl = docker.image('node:11.12-slim')
kubectl.inside("-u 0") {
sh "tests/scripts/self-destruct.sh"
}
}
}
}