forked from WeOps-Lab/OpsPilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
118 lines (100 loc) · 3.64 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
pipeline {
agent {
label 'ops-pilot'
}
environment {
NOTIFICATION_URL = credentials('NOTIFICATION_URL')
}
stages {
stage('下载代码') {
steps {
git branch: 'main',
url: 'https://github.com/WeOps-Lab/OpsPilot.git'
}
}
stage('构建基础服务镜像') {
steps {
dir('support-files/docker') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/pilot-base -f ./Dockerfile.base .'
}
dir('depend/elasticsearch') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/pilot-elasticsearch .'
}
dir('depend/saltstack_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/saltstack-server .'
}
dir('depend/bionics') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/bionics .'
}
}
}
stage('构建Model Servers') {
steps {
dir('model_server/bce_embed_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/bce-embed-server .'
}
dir('model_server/bce_rerank_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/bce-rerank-server .'
}
dir('model_server/chat_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/chat-server .'
}
dir('model_server/chunk_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/chunk-server .'
}
dir('model_server/classicfy_aiops_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/classicfy-aiops-server .'
}
dir('model_server/fast_embed_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/fast-embed-server .'
}
dir('model_server/ocr_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/ocr-server .'
}
dir('model_server/pandoc_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/pandoc-server .'
}
dir('model_server/rag_server') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/rag-server .'
}
}
}
stage('构建Pilot') {
steps {
dir('pilot') {
sh 'sudo docker build -t ccr.ccs.tencentyun.com/megalab/pilot .'
}
}
}
stage('构建Munchkin') {
steps {
dir('munchkin') {
sh '''
mkdir -p templates
sudo docker build -t ccr.ccs.tencentyun.com/megalab/munchkin .
'''
}
}
}
}
post {
success {
sh '''
curl -X POST $NOTIFICATION_URL \
-H 'Content-Type: application/json' \
-d '{
"content": "OpsPilot 构建成功"
}'
'''
}
failure {
sh '''
curl -X POST $NOTIFICATION_URL \
-H 'Content-Type: application/json' \
-d '{
"content": "OpsPilot 构建失败"
}'
'''
}
}
}