예제 #1
0
 def test_clone_git_repo(self):
     self.assertIsNotNone(util.clone_git_repo("https://github.com/alal3177/automaton.git"))
예제 #2
0
"""
This entire file is just an example to demonstrate functionality of staged deployment.
We will implement the execution workflow here when we have more time.
"""

import shutil

from lib import util
from deployment import common
from deployment.executor import Executor

# config file path
config_file = "../etc/global.conf"

# clone the repo locally
my_local_folder = util.clone_git_repo(util.read_config(config_file).get("DEFAULT","git_repo_location"))

# we fill a dict with our stages
stages = common.get_stages("client", my_local_folder, util.read_config(config_file).get("DEFAULT","git_repo_home"))


# remove the directory since it is not needed anymore
shutil.rmtree(my_local_folder,ignore_errors=True)

# clone the repo to the vm
remote_clone_result = util.RemoteCommand("vm-148-120.uc.futuregrid.org",\
    util.read_config(config_file).get("DEFAULT", "ssh_priv_key"),
    "git clone %s %s" % (util.read_config(config_file).get("DEFAULT","git_repo_location") ,
                         util.read_config(config_file).get("DEFAULT","git_repo_home"))).execute()

# initiate executor class with the stages
예제 #3
0
"""

import shutil

from lib import util
from deployment import common
from deployment.executor import Executor

# config file path
config_file = "../etc/global.conf"

# clone the repo locally
git_repo_location = util.read_config(config_file).get("DEFAULT",
                                                      "git_repo_location")
my_local_folder = util.clone_git_repo(git_repo_location)

# we fill a dict with our stages
git_repo_home = util.read_config(config_file).get("DEFAULT", "git_repo_home")
stages = common.get_stages("client", my_local_folder, git_repo_home)

# remove the directory since it is not needed anymore
shutil.rmtree(my_local_folder, ignore_errors=True)

# clone the repo to the vm
ssh_priv_key = util.read_config(config_file).get("DEFAULT", "ssh_priv_key")
cmd = "git clone %s %s" % (git_repo_location, git_repo_home)
remote_clone_result = util.RemoteCommand("vm-148-120.uc.futuregrid.org",
                                         ssh_priv_key, cmd).execute()

# initiate executor class with the stages
예제 #4
0
 def test_clone_git_repo(self):
     self.assertIsNotNone(
         util.clone_git_repo("https://github.com/"
                             "alal3177/automaton.git"))
예제 #5
0
"""
This entire file is just an example to demonstrate functionality of staged deployment.
We will implement the execution workflow here when we have more time.
"""

import shutil

from lib import util
from deployment import common
from deployment.executor import Executor

# config file path
config_file = "../etc/global.conf"

# clone the repo locally
my_local_folder = util.clone_git_repo(
    util.read_config(config_file).get("DEFAULT", "git_repo_location"))

# we fill a dict with our stages
stages = common.get_stages(
    "client", my_local_folder,
    util.read_config(config_file).get("DEFAULT", "git_repo_home"))

# remove the directory since it is not needed anymore
shutil.rmtree(my_local_folder, ignore_errors=True)

# clone the repo to the vm
remote_clone_result = util.RemoteCommand("vm-148-120.uc.futuregrid.org",\
    util.read_config(config_file).get("DEFAULT", "ssh_priv_key"),
    "git clone %s %s" % (util.read_config(config_file).get("DEFAULT","git_repo_location") ,
                         util.read_config(config_file).get("DEFAULT","git_repo_home"))).execute()