|
@@ -4,8 +4,8 @@ def jenkins_home="/var/jenkins_home/workspace/k8s"
|
|
def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue-jenkins"
|
|
def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue-jenkins"
|
|
def release="${BUILD_NUMBER}"
|
|
def release="${BUILD_NUMBER}"
|
|
def projectList = project_name.split(",")
|
|
def projectList = project_name.split(",")
|
|
-def list2 = ['mchsrv','sharebms2']
|
|
|
|
-
|
|
|
|
|
|
+def share-v2list = ['mchsrv','sharebms2','sharebms2-nginx','sharesrv2']
|
|
|
|
+def logonsvrlist = ['login-app-jl','login-app-lj','login-app-ln','login-mp','login-mp-gf','login-mp-intl','login-websocket','login-websocket-gf','登陆服务器-提审','登陆服务器-测试专用']
|
|
|
|
|
|
ansiColor('xterm') {
|
|
ansiColor('xterm') {
|
|
node {
|
|
node {
|
|
@@ -17,8 +17,12 @@ ansiColor('xterm') {
|
|
for (int i = 0; i < projectList.length ; i++) {
|
|
for (int i = 0; i < projectList.length ; i++) {
|
|
echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
for (int j = 0 ; j < list2.size() ; j++) {
|
|
for (int j = 0 ; j < list2.size() ; j++) {
|
|
- if ("${projectList[i]}" == "${list2[j]}") {
|
|
|
|
- echo "11111111111"
|
|
|
|
|
|
+ if ("${projectList[i]}" == "${share-v2list[j]}") {
|
|
|
|
+ sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/share-v2/${projectList[i]}/Dockerfile ${jenkins_home}/share-v2/${projectList[i]}"
|
|
|
|
+ } else if ("${projectList[i]}" == "${logonsvrlist[j]}") {
|
|
|
|
+ sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/logonsvr/${projectList[i]}/Dockerfile ${jenkins_home}/logonsvr/${projectList[i]}"
|
|
|
|
+ } else {
|
|
|
|
+ sh "docker build -t ${xy_image}${projectList[i]}:${release} -f ${jenkins_home}${projectList[i]}/Dockerfile ${jenkins_home}${projectList[i]}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|