fix: migrate service script
This commit is contained in:
@@ -121,8 +121,8 @@ class ServiceCreator:
|
||||
iocs_overview = IocsOverview.read_from_file()
|
||||
iocs_overview.add_ioc(service, description=self.ioc_description)
|
||||
|
||||
branch_name = f"feature/add-service-{service.dir_name}"
|
||||
delete_local_branch(repo, branch_name)
|
||||
branch_name = f"feature/add-new-service-all"
|
||||
# delete_local_branch(repo, branch_name)
|
||||
switch_branch(repo, branch_name)
|
||||
|
||||
def copy_files_from_current_service():
|
||||
@@ -159,21 +159,21 @@ class ServiceCreator:
|
||||
shutil.copyfile(CURRENT_FILENAME, DEST_FILENAME)
|
||||
|
||||
# ioc template
|
||||
CURRENT_FILENAME = (
|
||||
REPO_ROOT
|
||||
/ ".."
|
||||
/ "A_BD"
|
||||
/ f"AGEBD-CPCL-{service.name_upper}"
|
||||
/ f"{service.name_upper}.template"
|
||||
).resolve()
|
||||
DEST_FILENAME = str(
|
||||
REPO_ROOT
|
||||
/ "services"
|
||||
/ service.dir_name
|
||||
/ "current"
|
||||
/ "ioc"
|
||||
/ f"{service.name_upper}.template"
|
||||
)
|
||||
# CURRENT_FILENAME = (
|
||||
# REPO_ROOT
|
||||
# / ".."
|
||||
# / "A_BD"
|
||||
# / f"AGEBD-CPCL-{service.name_upper}"
|
||||
# / f"{service.name_upper}.template"
|
||||
# ).resolve()
|
||||
# DEST_FILENAME = str(
|
||||
# REPO_ROOT
|
||||
# / "services"
|
||||
# / service.dir_name
|
||||
# / "current"
|
||||
# / "ioc"
|
||||
# / f"{service.name_upper}.template"
|
||||
# )
|
||||
shutil.copyfile(CURRENT_FILENAME, DEST_FILENAME)
|
||||
|
||||
try:
|
||||
@@ -182,14 +182,14 @@ class ServiceCreator:
|
||||
user=self.user,
|
||||
)
|
||||
self._generate_uv_lock(service=service)
|
||||
registry.write_to_config()
|
||||
registry_old.write_to_config()
|
||||
iocs_overview.write_to_file()
|
||||
|
||||
copy_files_from_current_service()
|
||||
|
||||
files_to_stage = [
|
||||
f"services/{service.dir_name}/current",
|
||||
"config/services_registry.yml",
|
||||
# "config/services_registry.yml",
|
||||
"docs/ioc/ioc_overview.md",
|
||||
]
|
||||
# TODO: can't push if branch already exists in remote
|
||||
|
||||
Reference in New Issue
Block a user