コード例 #1
0
 def create_container(self):
     if self.is_container_available():
         logger.info("Container already available")
     else:
         logger.info("Creating container based on image '{0}'.".format(self.container_image_id))
         utils.execute_command(self.cmd_create_container)
     utils.execute_command(self.cmd_set_execution_mode)
コード例 #2
0
def git_pull(repo_folder):
    previous_cwd = os.getcwd()
    os.chdir(repo_folder)
    print("pulling the data from repository.")
    utils.execute_command("git pull")
    print("pulled the data repository.")
    os.chdir(previous_cwd)
コード例 #3
0
def git_clone(target_folder, git_init_url):
    previous_cwd = os.getcwd()
    os.chdir(target_folder)
    print("Cloning existing repo.")
    utils.execute_command('git clone ' + git_init_url + " .")
    print("Cloned existing repo.")
    os.chdir(previous_cwd)
コード例 #4
0
ファイル: scarsupervisor.py プロジェクト: iMerica/scar
 def download_container_image(self):
     logger.info("Pulling container '{0}' from Docker Hub".format(
         self.container_image_id))
     utils.execute_command(self.cmd_download_image)
コード例 #5
0
ファイル: scarsupervisor.py プロジェクト: iMerica/scar
 def load_local_container_image(self):
     logger.info("Loading container image '{0}'".format(
         self.container_image_id))
     utils.execute_command(self.cmd_load_image)
コード例 #6
0
def git_commit(target_folder):
    previous_cwd = os.getcwd()
    os.chdir(target_folder)
    utils.execute_command('git add *.gpg')
    utils.execute_command('git commit -m "commited by script"')
    os.chdir(previous_cwd)