@@ -73,7 +73,9 @@ def create_preview_command(
7373 branch_preview_env_already_exist = os .path .exists (root_git .get_full_file_path (new_preview_folder_name ))
7474 logging .info ("Is preview env already existing for branch? %s" , branch_preview_env_already_exist )
7575 if not branch_preview_env_already_exist :
76- __create_new_preview_env (branch , new_preview_folder_name , preview_template_folder_name , root_git )
76+ __create_new_preview_env (
77+ branch , new_preview_folder_name , preview_template_folder_name , root_git , gitops_config .application_name
78+ )
7779 new_image_tag = apps_git .get_last_commit_hash ()
7880 logging .info ("Using image tag from last app repo commit: %s" , new_image_tag )
7981 route_host = None
@@ -154,7 +156,7 @@ def __no_deployment_needed(apps_git, new_image_tag, parent_id, pr_id):
154156
155157
156158def __create_new_preview_env (
157- branch , new_preview_folder_name , preview_template_folder_name , root_git ,
159+ branch , new_preview_folder_name , preview_template_folder_name , root_git , app_name ,
158160):
159161 shutil .copytree (
160162 root_git .get_full_file_path (preview_template_folder_name ), root_git .get_full_file_path (new_preview_folder_name ),
@@ -163,11 +165,11 @@ def __create_new_preview_env(
163165 logging .info ("Looking for Chart.yaml at: %s" , chart_file_path )
164166 if root_git .get_full_file_path (chart_file_path ):
165167 update_yaml_file (root_git .get_full_file_path (chart_file_path ), "name" , new_preview_folder_name )
166- root_git .commit (f"Initiated new preview env for branch { branch } ' " )
168+ root_git .commit (f"Create new preview env for application: { app_name } and branch: { branch } " )
167169
168170
169171def __create_pullrequest (branch , gitops_config , root_git ):
170- title = "Updated preview environemnt for " + gitops_config .application_name
172+ title = "Updated preview environment for " + gitops_config .application_name
171173 description = f"""
172174This Pull Request is automatically created through [gitopscli](https://github.com/baloise-incubator/gitopscli).
173175"""
0 commit comments