Exemplo n.º 1
0
 def pull_wrappers(self):
   # clean local wrapper changes
   check_call(["git", "checkout", "--", "*"], wd=self.wrapper_repo)
   check_call(["git", "clean", "-f"], wd=self.wrapper_repo)
   check_call(["git", "clean", "-f", "-d"], wd=self.wrapper_repo)
   # pull down latest wrappers
   check_call(["git", "pull"], wd=self.wrapper_repo)
Exemplo n.º 2
0
 def pull_wrappers(self):
   # clean local wrapper changes
   check_call(["git", "checkout", "--", "*"], wd=self.wrapper_repo)
   check_call(["git", "clean", "-f"], wd=self.wrapper_repo)
   check_call(["git", "clean", "-f", "-d"], wd=self.wrapper_repo)
   # pull down latest wrappers
   check_call(["git", "pull"], wd=self.wrapper_repo)
Exemplo n.º 3
0
 def copy_file(self, fname, src_dir, dest_dir,
               new_fname = None,
               remote_host = None,
               remote_user = None,
               remote_login = None):
     f0 = join(src_dir, fname)
     f1 = join(dest_dir, fname if new_fname is None else new_fname)
     if remote_host is None and remote_user is None and remote_login is None:
       shutil.copyfile(f0, f1)
       print "copied {0} to {1}".format(f0, f1)
     else:
       dest_spec = "{0}@{1}:{2}".format(remote_user, remote_host, f1)
       cmds = ["scp", "-i", remote_login, f0, dest_spec]
       check_call(cmds, wd = dest_dir)
Exemplo n.º 4
0
 def release_to_prod(self):
   war_file = "BigSemanticsService.war"
   dest_dir = "{0}@{1}:{2}".format(self.prod_user,
                                   self.prod_host,
                                   self.prod_webapps_dir)
   cmds = ["scp", "-i", self.prod_login_id, war_file, dest_dir]
   check_call(cmds, wd = self.webapps_dir)
   onto_vis_dir = join(self.wrapper_proj, "OntoViz")
   onto_vis_data_file = "mmd_repo.json"
   dest_static_html_dir = join(self.prod_webapps_dir, "root")
   dest_dir = "{0}@{1}:{2}".format(self.prod_user,
                                   self.prod_host,
                                   dest_static_html_dir)
   cmds = ["scp", "-i", self.prod_login_id, onto_vis_data_file, dest_dir]
   check_call(cmds, wd = onto_vis_dir)
Exemplo n.º 5
0
 def release_to_prod(self):
   # copy the war file
   war_file = "BigSemanticsService.war"
   dest_dir = "{0}@{1}:{2}".format(self.prod_user,
                                   self.prod_host,
                                   self.prod_webapps_dir)
   cmds = ["scp", "-i", self.prod_login_id, war_file, dest_dir]
   check_call(cmds, wd = self.webapps_dir)
   # copy the generated visualization file
   onto_vis_dir = join(self.wrapper_proj, "OntoViz")
   onto_vis_data_file = "mmd_repo.json"
   dest_static_html_dir = join(self.prod_webapps_dir, "root")
   dest_dir = "{0}@{1}:{2}".format(self.prod_user,
                                   self.prod_host,
                                   dest_static_html_dir)
   cmds = ["scp", "-i", self.prod_login_id, onto_vis_data_file, dest_dir]
   check_call(cmds, wd = onto_vis_dir)
   # generate and copy the example table data file
   example_table_script = "generate_domain_example_table.py"
   example_table_data_file = "domain_type_examples.json"
   cmds = ["python", example_table_script, "--out", example_table_data_file]
   check_call(cmds, wd = onto_vis_dir)
   cmds = ["scp", "-i", self.prod_login_id, example_table_data_file, dest_dir]
   check_call(cmds, wd = onto_vis_dir)
Exemplo n.º 6
0
 def build(self):
     check_call(["ant", "clean"], wd=self.dpool_dir)
     check_call(["ant", "war"], wd=self.dpool_dir)
     check_call(["ant", "downloader-jar"], wd=self.dpool_dir)
Exemplo n.º 7
0
 def build_service_war(self):
   check_call(["ant", "clean"], wd=self.service_build)
   check_call(["ant", "buildwar"], wd=self.service_build)
   shutil.copy2(join(self.service_build, "BigSemanticsService.war"),
                self.webapps_dir)
Exemplo n.º 8
0
 def compile_wrappers_to_jars(self):
   check_call(["ant", "clean"], wd=self.wrapper_proj)
   check_call(["ant"], wd=self.wrapper_proj)
Exemplo n.º 9
0
 def compile_projs(self):
   # compile service
   call(["find", ".", "-name", "build", "-exec", "rm", "-rf", "{}", ";"],
        wd=self.bs_repo)
   check_call(["ant", "clean"], wd=self.service_proj)
   check_call(["ant", "main"], wd=self.service_proj)
Exemplo n.º 10
0
 def git_update_to_latest(self, git_dir):
   # update submodules, if any
   if isfile(join(git_dir, ".gitmodules")):
     check_call(["git", "submodule", "foreach", "git", "checkout", "--", "*"], wd=git_dir)
     check_call(["git", "submodule", "foreach", "git", "clean", "-f"], wd=git_dir)
     check_call(["git", "submodule", "foreach", "git", "clean", "-f", "-d"], wd=git_dir)
     check_call(["git", "submodule", "foreach", "git", "fetch"], wd=git_dir)
   # clean local changes
   check_call(["git", "checkout", "--", "*"], wd=git_dir)
   check_call(["git", "clean", "-f"], wd=git_dir)
   check_call(["git", "clean", "-f", "-d"], wd=git_dir)
   # pull down latest code
   check_call(["git", "pull"], wd=git_dir)
   check_call(["git", "submodule", "update"], wd=git_dir)
Exemplo n.º 11
0
 def build(self):
   check_call(["ant", "clean"], wd = self.dpool_dir)
   check_call(["ant", "war"], wd = self.dpool_dir)
   check_call(["ant", "downloader-jar"], wd = self.dpool_dir)
Exemplo n.º 12
0
 def build_service_war(self):
   check_call(["ant", "clean"], wd=self.service_build)
   check_call(["ant", "buildwar"], wd=self.service_build)
   shutil.copy2(join(self.service_build, "BigSemanticsService.war"),
                self.webapps_dir)
Exemplo n.º 13
0
 def compile_wrappers_to_jars(self):
   check_call(["ant", "clean"], wd=self.wrapper_proj)
   check_call(["ant"], wd=self.wrapper_proj)