a
This commit is contained in:
		
					parent
					
						
							
								be15534332
							
						
					
				
			
			
				commit
				
					
						138db78d27
					
				
			
		
					 6 changed files with 12 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -48,7 +48,8 @@ def setup(
 | 
			
		|||
 | 
			
		||||
    # Git Operation Depends on success of previous operation i.e PackageManagementOperation
 | 
			
		||||
    op = GitOperation.clone(
 | 
			
		||||
        url=f"https://code.ungleich.ch/ungleich-public/{repo_name}.git"
 | 
			
		||||
        url=f"https://code.ungleich.ch/ungleich-public/{repo_name}.git",
 | 
			
		||||
        arguments="-b wip"
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    content = (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,7 +29,8 @@ def setup(path, base_dir, file_prefix, etcd_url, etcd_password):
 | 
			
		|||
    repo_name = "ucloud-file-scan"
 | 
			
		||||
 | 
			
		||||
    op_result = GitOperation.clone(
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git"
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git",
 | 
			
		||||
        arguments="-b wip"
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    content = (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,8 +59,8 @@ class Operation(ABC):
 | 
			
		|||
 | 
			
		||||
class GitOperation(object):
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def clone(url, path="."):
 | 
			
		||||
        command = f"git clone {url}"
 | 
			
		||||
    def clone(url, path=".", arguments=""):
 | 
			
		||||
        command = f"git clone {arguments} {url}"
 | 
			
		||||
        try:
 | 
			
		||||
            output = subprocess.check_output(command.split(), cwd=path)
 | 
			
		||||
        except subprocess.CalledProcessError as e:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,8 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, etcd_passwor
 | 
			
		|||
    repo_name = "ucloud-vm"
 | 
			
		||||
 | 
			
		||||
    op_result = GitOperation.clone(
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git"
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git",
 | 
			
		||||
        arguments="-b wip"
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    content = (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,7 +28,8 @@ def setup(path, base_dir, etcd_url, etcd_password):
 | 
			
		|||
    repo_name = "ucloud-image-scanner"
 | 
			
		||||
 | 
			
		||||
    op_result = GitOperation.clone(
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git"
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git",
 | 
			
		||||
        arguments="-b wip"
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    content = (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,8 @@ def setup(path, vm_prefix, host_prefix, request_prefix, etcd_url, etcd_password)
 | 
			
		|||
    repo_name = "ucloud-scheduler"
 | 
			
		||||
 | 
			
		||||
    op_result = GitOperation.clone(
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git"
 | 
			
		||||
        f"https://code.ungleich.ch/ungleich-public/{repo_name}.git",
 | 
			
		||||
        arguments="-b wip"
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    content = (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue