You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							884 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							884 B
						
					
					
				
								import os
							 | 
						|
								from tools import *
							 | 
						|
								import datetime
							 | 
						|
								
							 | 
						|
								tar_save_dir = "/Volumes/wxz/镜像"
							 | 
						|
								
							 | 
						|
								modules_to_deploy = get_modules_to_deploy()
							 | 
						|
								
							 | 
						|
								for module_name in modules_to_deploy:
							 | 
						|
								    # 获取模块信息
							 | 
						|
								    module_dir, module_prefix, module_port, healty_check = get_module_infos(module_name)
							 | 
						|
								    # 执行编译制定模块
							 | 
						|
								    os.system("mvn clean package -P prod -pl %s -am" % (module_dir,))
							 | 
						|
								    print("========== 编译完成 =========")
							 | 
						|
								
							 | 
						|
								    version = get_version()
							 | 
						|
								
							 | 
						|
								    os.system("docker build -t epmet-cloud-master/{}:{} {}".format(module_name, version, module_dir))
							 | 
						|
								    print("========== 构建成功 =========")
							 | 
						|
								
							 | 
						|
								    image_name = "{}:{}".format(module_name, version)
							 | 
						|
								    tar_name = "{}.tar".format(module_name)
							 | 
						|
								    os.system("docker save epmet-cloud-master/{}:{} -o {}/{}".format(module_name, version, tar_save_dir, tar_name))
							 | 
						|
								    print("========== load镜像到磁盘成功 =========")
							 | 
						|
								
							 |