| 
					
				 | 
			
			
				@@ -13,19 +13,45 @@ steps: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    image: hub.evbj.easou.com/dev/alpine-git:20200622 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    commands: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    - git clone --depth=1 $DRONE_GIT_HTTP_URL . 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- - name: build 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   image: plugins/docker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   settings: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     username: admin 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     password: Easou2)1* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     insecure: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     mirror: https://tfstj46s.mirror.aliyuncs.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     registry: hub.evbj.easou.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     repo: hub.evbj.easou.com/bi/${DRONE_REPO_NAME} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     tag: v1base  #op/tag:v2.1.7 http://y.easou.com/  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ - name: deployment 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   image: hub.evbj.easou.com/dev/drone-agent:v3.0.1-240910 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   pull: always 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   environment: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     JNLP_ENV: bi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_REPLICAS: 2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_TAG: v3.0.0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_VERSION: v1  # default v1, v2 for canary 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     DEPLOY_ENV: k8s-2 # 可以选择把应用部署到集群:k8s-1(阿里云) or k8s-2(IDC机房) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_REPO: hub.evbj.easou.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_CONTAINER_PORT: 8080 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     JNLP_INGRESS: nginx 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     JNLP_SVC_MODE: http 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_STORAGE_CLASS: rbd   #k8s-2的STORAGE_CLASS为: rbd; k8s-1的STORAGE_CLASS为: ceph-block 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     JNLP_DOMAIN: .ieasou.cn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_CONTROL: StatefulSet 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_STORAGE_CAPACITY: 200Gi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_MOUNT_PATH: /data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_LIVENESS_INIT: 45 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_LIVENESS_PER: 15 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_READINESS_INIT: 45 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #JNLP_READINESS_PER: 15 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     JNLP_INGRESS_PUB: yes 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   commands: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # 切换目标集群 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     - kubecm s $DEPLOY_ENV 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # 生成配置YAML文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # - python3 /root/tools.py -b 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # 部署服务到kubernetes上 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # - python3 /root/tools.py -a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # apply for prod 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     - kubectl apply -f deploy.yaml --record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # apply for canary 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #- kubectl apply -f deploy-canary.yaml --record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # 检查服务部署状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # - python3 /root/tools.py -c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     # 添加dns解析记录,生成访问域名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     #- python3 /root/tools.py -d 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  - name: success 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    image: hub.evbj.easou.com/dev/drone-wechat:20200622 
			 |