Browse Source

Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Web into kitchenmanage

tmp
zhaoy 9 months ago
parent
commit
2e4c5fba3d
2 changed files with 16 additions and 16 deletions
  1. +8
    -8
      Jenkinsfile
  2. +8
    -8
      k8s_kitchenmanageweb.yaml

+ 8
- 8
Jenkinsfile View File

@@ -16,7 +16,7 @@ pipeline{
choice(
description: 'EIP环境',
name: 'environment',
choices: ['dev1']
choices: ['saasdev1']
)

choice(
@@ -28,7 +28,7 @@ pipeline{
choice(
description: '是否下载包',
name: 'isDownloadPackage',
choices: ['是','否']
choices: ['否','是']
)

string(
@@ -86,7 +86,7 @@ pipeline{
sh "rm -rf ./dist/*"
sh "npm run build"
}
sh "docker build -t 10.2.1.24:10242/bpa/kitchenweb:${build_tag} ."
sh "docker build -t 10.2.1.24:10242/bpa/kitchenmanageweb:${build_tag} ."
}
}
}
@@ -105,7 +105,7 @@ pipeline{
sh "docker login -u ${harborUser} -p ${harborPassword} 10.2.1.24:10242"
if(params.operation=='develop')
{
sh "docker push 10.2.1.24:10242/bpa/kitchenweb:${build_tag}"
sh "docker push 10.2.1.24:10242/bpa/kitchenmanageweb:${build_tag}"
}
}
}
@@ -127,10 +127,10 @@ pipeline{
// /root/eip/web/shell/linux-eipweb.install.sh eipweb ${build_tag} 80
// """

sh "sed -i 's/<BUILD_TAG>/${build_tag}/' k8s_kitchenweb.yaml"
sh "sed -i 's/<BRANCH_NAME>/${env.BRANCH_NAME}/' k8s_kitchenweb.yaml"
sh "sed -i 's/<NAMESPACES>/${params.environment}/' k8s_kitchenweb.yaml"
sh "kubectl apply -f k8s_kitchenweb.yaml --record"
sh "sed -i 's/<BUILD_TAG>/${build_tag}/' k8s_kitchenmanageweb.yaml"
sh "sed -i 's/<BRANCH_NAME>/${env.BRANCH_NAME}/' k8s_kitchenmanageweb.yaml"
sh "sed -i 's/<NAMESPACES>/${params.environment}/' k8s_kitchenmanageweb.yaml"
sh "kubectl apply -f k8s_kitchenmanageweb.yaml "
}




k8s_kitchenweb.yaml → k8s_kitchenmanageweb.yaml View File

@@ -1,23 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kitchenweb
name: kitchenmanageweb
namespace: kube-<NAMESPACES>
spec:

selector:
matchLabels:
app: kitchenweb
app: kitchenmanageweb
replicas: 1
template:
metadata:
labels:
app: kitchenweb
app: kitchenmanageweb
spec:
containers:
- image: 10.2.1.24:10242/bpa/kitchenweb:<BUILD_TAG>
- image: 10.2.1.24:10242/bpa/kitchenmanageweb:<BUILD_TAG>
imagePullPolicy: IfNotPresent
name: kitchenweb
name: kitchenmanageweb
env:
- name: branch
value: <BRANCH_NAME>
@@ -45,8 +45,8 @@ kind: Service
apiVersion: v1
metadata:
labels:
app: kitchenweb
name: kitchenweb
app: kitchenmanageweb
name: kitchenmanageweb
namespace: kube-<NAMESPACES>
spec:
type: ClusterIP
@@ -54,4 +54,4 @@ spec:
- port: 80
name: http
selector:
app: kitchenweb
app: kitchenmanageweb

Loading…
Cancel
Save