Exemple #1
0
 def __init__(self, path, target):
     self.name = "Make war"
     self.path = path
     self.target_server = target
     self.logging = myLogger.MyLogger().mylogging()
     self.target_path = '\\target\menuCenter_web-0.0.1-SNAPSHOT.war'
     self.target_name = "menuCenter_web-0.0.1-SNAPSHOT.war"
     self.file_name = 'menuCenter.war'
Exemple #2
0
 def __init__(self, server, path):
     self.target = server
     self.logging = myLogger.MyLogger().mylogging()
     self.esbclient_xml = 'D:\Data\YumWar\\uat\ESBClient\\UAT_ESBclient\ESBClient.xml'
     self.resource_path = 'src\main\\resources\\'
     self.config_path = 'src\main\\resources\config\\'
     self.lib_path = 'src\main\webapp\WEB-INF\lib\\'
     self.changed_files_prd_path = 'D:\Data\YumWar\product\destFiles\\'
     self.path = path
Exemple #3
0
 def __init__(self):
     self.filename = "menuCenter_web-0.0.1-SNAPSHOT.war"
     self.filename_local = "menuCenter.war"
     self.config = Config.Env(self)
     self.ftp = FTP()
     self.ftp.set_debuglevel(2)
     self.local_dir = self.config.local_env()
     self.logging = log.MyLogger().mylogging()
     self.path = 'menuCenter/'  # 要进行压缩的文档目录
     if os.path.exists(self.local_dir):
         os.chdir(self.local_dir)
     else:
         os.mkdir(self.local_dir)
         os.chdir(self.local_dir)
Exemple #4
0
    def __init__(self):
        self.name = "svn"
        self.mc_web_remote = 'svn://15.107.29.25/trunk/40. CUT/40.10 SRC/menuCenter_web/trunk'
        self.mc_web_local = 'D:\Data\menuCeter_web'
        self.client = pysvn.Client()
        self.logging = myLogger.MyLogger().mylogging()
        self.svn_name = base64.b64decode('ZG9uZ2d1YW5nemhlbg==')
        self.svn_pass = base64.b64decode('ZG9uZ2d1YW5nemhlbg==')

        def callback_get_login(realm, username, may_save):
            name = 'dongguangzhen'
            password = '******'
            return True, name, password, True

        self.client.callback_get_login = callback_get_login
Exemple #5
0
 def __init__(self):
     self.config = Config.Env()
     self.local_log = 'D:\Data\YumWar\log'
     self.logging = myLogger.MyLogger().mylogging()
Exemple #6
0
    end_time = time.time()
    myLog.info("success, 用时 {}s".format(str(end_time - start_time)))


def deploy_to_202(ftp, myLog):
    ftp.upload_to_202()
    myLog.info("202 updated.")
    print("202 updated.")


def deploy_to_201(ftp, myLog):
    ftp.upload_to_201()
    myLog.info("201 updated.")
    print("201 updated")


def deploy_to_57(ftp, myLog):
    ftp.upload_to_57()
    myLog.info("57 updated.")
    print("57 updated")


if __name__ == '__main__':
    myLog = myLogger.MyLogger().mylogging()
    ftp = FTP_SFTP_Client.FTPClient()
    servers = input(
        'Deploy Server [uat][pro][dev][mobile][mbrand][prepro]: ').split()
    myLog.info(servers)
    for server in servers:
        main(server.lower(), myLog, ftp)