Ejemplo n.º 1
0
    def __init__(self, site):
        '''
        Constructor
        '''
        self.home = os.getenv("HOME", "C:\\Documents and Settings\\301645")
        self.workspace = os.getenv("WORKSPACE", r"C:\hudson\workspace\gameid_build_new")#self.home)
        self.revision = os.getenv("revision", "HEAD")
        self.is_need_build = os.getenv("is_need_build", "true")
        self.common_p = pyproperties(self.workspace + r"\sbp_2.0\sites\common.config.yaml").get_dict()
        self.private_p = pyproperties(self.workspace + r"\sbp_2.0\sites" + os.sep + site + os.sep + site +  r"_build.config.yaml").get_dict()
        #self.site_names = self.private_p.get_property("site_names")
        self.sourcecode_urls = self.private_p["sourcecode_urls"]
        self.sourcecode_dirs = self.add_pre_for_arr(self.workspace + os.sep, self.private_p["sourcecode_dirs"], True)
        self.sourcecode_username = self.get_property("sourcecode_username")
        self.sourcecode_password = self.get_property("sourcecode_password")
        self.sourcecode_dir = self.sourcecode_dirs[0]
        self.build_batch = self.workspace + os.sep + self.private_p["build_batch"]
        #self.copy_bats = self.add_pre_for_arr(self.sourcecode_dir + os.sep, self.private_p["copy_batches"], True)
        self.full_site_name = os.getenv("site_name", "ALL")
        self.sites = self.private_p["sites"]    
        self.product_username = self.get_property("product_username")
        self.product_password = self.get_property("product_password")
        self.online_username = self.get_property("online_username")
        self.online_password = self.get_property("online_password")
        self.getversion_exe = self.workspace + os.sep + self.private_p["GetVersion"]
        self.sourcecode_st = ""

        self.to_list = os.getenv("to_list", "liubin")
        self.hudson_url = "http://192.168.3.130:8080/hudson/job/"
        self.log_url = self.hudson_url + os.path.basename(self.workspace) + "/" + os.getenv('BUILD_NUMBER', "100") + r"/console"
        self.message = os.getenv("message", time.strftime("%y-%m-%d",time.localtime()))
        self.py_log_file = self.workspace + os.sep + "py_log_file.txt"
Ejemplo n.º 2
0
 def __init__(self, site):
     self.workspace = os.getenv("WORKSPACE", r"D:\Documents and Settings\binliu\workspace")#self.home)
     self.revision = os.getenv("revision", "HEAD")
     self.full_site_name = os.getenv("site_name", "ALL")
     self.common_p = pyproperties(self.workspace + r"\sbp_2.0\sites\common.config.yaml").get_dict()
     self.private_p = pyproperties(self.workspace + r"\sbp_2.0\sites" + os.sep + site + os.sep + self.full_site_name +  r"_update.config.yaml").get_dict()
     self.product_tag_url = self.private_p["product_url"] + "/tags/" + self.full_site_name
     self.product_trunk_url = self.private_p["product_url"] + "/trunk/" + self.full_site_name
     self.product_tag_dir = self.workspace + os.sep + self.private_p["product_tag_dir"]
     self.product_trunk_dir = self.workspace + os.sep + self.private_p["product_trunk_dir"]
     self.changelist = self.product_trunk_dir + os.sep + "changelist.txt"
     self.sourcecode_username = self.get_property("sourcecode_username")
     self.sourcecode_password = self.get_property("sourcecode_password")
     self.product_username = self.get_property("product_username")
     self.product_password = self.get_property("product_password")
     self.online_username = self.get_property("online_username")
     self.online_password = self.get_property("online_password")
     self.online_site_path = self.private_p["online_site_path"]
     self.app_pool = self.private_p["app_pool"]
     self.website_verified_url = self.private_p["website_verified_url"]
     self.verified_keyword = self.private_p["verified_keyword"]
     self.inteveral_time = 100
     self.web_decode = "gb2312"
     self.temp_changelist = self.workspace + os.sep + "changlist.txt"
     self.to_list = os.getenv("to_list", "scm")
     self.hudson_url = "http://192.168.3.130:8080/hudson/job/"
     self.log_url = self.hudson_url + os.path.basename(self.workspace) + "/" + os.getenv('BUILD_NUMBER', "100") + r"/console"
     #self.message = os.getenv("message", time.strftime("%y-%m-%d",time.localtime()))
     self.py_log_file = self.workspace + os.sep + "py_log_file.txt"
     self.release_notes_local_path = self.workspace + os.sep + "release_notes"
     self.release_notes_url = os.getenv("release_notes_url")