Skip to content

Commit f1daafb

Browse files
committed
Automation Toolkit Release v2024.4.2
1 parent f4de26b commit f1daafb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

cd3_automation_toolkit/user-scripts/createTenancyConfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ def update_devops_config(prefix, repo_ssh_url,files_in_repo,dir_values,devops_us
164164
if not os.path.exists(user_ssh_dir):
165165
os.makedirs(user_ssh_dir)
166166
'''
167-
168167
#ssh_config_file = user_ssh_dir + '/config'
168+
169+
if not os.path.exists(jenkins_home):
170+
os.mkdir(jenkins_home)
169171
ssh_config_file = jenkins_home + '/git_config'
170172

171173
#if /cd3user/.ssh/config file exists
@@ -211,8 +213,6 @@ def update_devops_config(prefix, repo_ssh_url,files_in_repo,dir_values,devops_us
211213
'''
212214

213215
# create jenkins.properties file
214-
if not os.path.exists(jenkins_home):
215-
os.mkdir(jenkins_home)
216216
jenkins_properties_file_path = jenkins_home+"/jenkins.properties"
217217

218218
if dir_values:

cd3_automation_toolkit/user-scripts/deleteTenancyConfig.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,10 @@
391391

392392
if exception == False:
393393
# Removes prefix directory
394-
shutil.rmtree(customer_tenancy_dir)
395-
shutil.rmtree(jenkins_home+"/jobs/"+prefix)
394+
if (os.path.exists(customer_tenancy_dir)):
395+
shutil.rmtree(customer_tenancy_dir)
396+
if (os.path.exists(jenkins_home+"/jobs/"+prefix)):
397+
shutil.rmtree(jenkins_home+"/jobs/"+prefix)
396398

397399
#Removes prefix from createTenancyConfig.safe
398400
if os.path.exists(safe_file):

0 commit comments

Comments
 (0)