diff --git a/Jenkinsfile b/Jenkinsfile index 582e9e8..78d55db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' - } - } - } } } \ No newline at end of file diff --git a/violin-home-dev.yaml b/violin-home-dev.yaml deleted file mode 100644 index 6777fa3..0000000 --- a/violin-home-dev.yaml +++ /dev/null @@ -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