to delete cd yaml
This commit is contained in:
Vendored
+1
-14
@@ -63,7 +63,7 @@ spec:
|
||||
node(label) {
|
||||
def myRepo = checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: "*/dev"]],
|
||||
branches: [[name: "*/master"]],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[$class: 'CloneOption', noTags: false, reference: '', shallow: true, timeout: 1000]]+[[$class: 'CheckoutOption', timeout: 1000]],
|
||||
submoduleCfg: [],
|
||||
@@ -99,18 +99,5 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('预发布') {
|
||||
withKubeConfig([
|
||||
credentialsId: 'kubeconfig',
|
||||
serverUrl: 'https://49.233.4.79:6443'
|
||||
]) {
|
||||
container('kubectl') {
|
||||
echo "查看 K8S 集群 Pod 列表"
|
||||
sh 'kubectl delete deployment violin-home-deployment -n dev'
|
||||
sh 'kubectl apply -f violin-home-dev.yaml'
|
||||
sh 'kubectl get pod -n dev -owide | grep violin-home-deployment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: violin-home-deployment
|
||||
namespace: dev
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: violin-home
|
||||
image: ccr.ccs.tencentyun.com/violin/violin-home:v1.00
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: localtime
|
||||
mountPath: /etc/localtime
|
||||
imagePullSecrets:
|
||||
- name: dev-key
|
||||
volumes:
|
||||
- name: localtime
|
||||
hostPath:
|
||||
path: /etc/localtime
|
||||
Reference in New Issue
Block a user