-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
51 lines (51 loc) · 1.35 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
pipeline {
agent {label '132'}
stages {
stage('Stop Server') {
steps {
catchError(buildResult: 'SUCCESS') {
sh 'target/o2server/stop_linux.sh'
}
}
}
stage('init') {
steps {
sh 'npm install'
sh 'npm run clear_deploy'
}
}
stage('dependency') {
steps {
sh 'npm run preperation:linux'
}
}
stage('build') {
parallel {
stage('build server') {
steps {
sh 'id'
sh 'npm run build_server'
}
}
stage('build web') {
steps {
sh 'npm run build_web'
}
}
}
}
stage('deploy') {
steps {
sh 'npm run deploy:linux'
sh 'chmod 777 -R target/o2server/jvm'
sh 'chmod 777 -R target/o2server/commons'
sh 'chmod 777 target/o2server/*.sh'
}
}
stage('run') {
steps {
sh 'JENKINS_NODE_COOKIE=dontKillMe nohup target/o2server/start_linux.sh > nohup.out &'
}
}
}
}