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
|
# Git Operation Depends on success of previous operation i.e PackageManagementOperation
|
||||||
op = GitOperation.clone(
|
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 = (
|
content = (
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ def setup(path, base_dir, file_prefix, etcd_url, etcd_password):
|
||||||
repo_name = "ucloud-file-scan"
|
repo_name = "ucloud-file-scan"
|
||||||
|
|
||||||
op_result = GitOperation.clone(
|
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 = (
|
content = (
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ class Operation(ABC):
|
||||||
|
|
||||||
class GitOperation(object):
|
class GitOperation(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def clone(url, path="."):
|
def clone(url, path=".", arguments=""):
|
||||||
command = f"git clone {url}"
|
command = f"git clone {arguments} {url}"
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(command.split(), cwd=path)
|
output = subprocess.check_output(command.split(), cwd=path)
|
||||||
except subprocess.CalledProcessError as e:
|
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"
|
repo_name = "ucloud-vm"
|
||||||
|
|
||||||
op_result = GitOperation.clone(
|
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 = (
|
content = (
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ def setup(path, base_dir, etcd_url, etcd_password):
|
||||||
repo_name = "ucloud-image-scanner"
|
repo_name = "ucloud-image-scanner"
|
||||||
|
|
||||||
op_result = GitOperation.clone(
|
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 = (
|
content = (
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ def setup(path, vm_prefix, host_prefix, request_prefix, etcd_url, etcd_password)
|
||||||
repo_name = "ucloud-scheduler"
|
repo_name = "ucloud-scheduler"
|
||||||
|
|
||||||
op_result = GitOperation.clone(
|
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 = (
|
content = (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue