Skip to content

Commit a918380

Browse files
authored
Merge pull request #145 from oracle-devrel/develop
CD3 Automation Toolkit Tag v2025.1.2
2 parents 30ea762 + 57fdb3b commit a918380

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+455
-314
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ sudo unzip terraform-provider-null_${TF_NULL_PROVIDER}_linux_amd64.zip -d /cd3us
6262
sudo cp -r /cd3user/.terraform.d/plugins/registry.terraform.io /cd3user/.terraform.d/plugins/registry.opentofu.org && \
6363
sudo chown -R cd3user:cd3user /cd3user/ && \
6464
sudo rm -rf terraform-provider-null_${TF_NULL_PROVIDER}_linux_amd64.zip terraform-provider-oci_${TF_OCI_PROVIDER}_linux_amd64.zip ;\
65+
6566
fi
6667

6768
##################################### START INSTALLING JENKINS ###################################
68-
ARG JENKINS_VERSION=2.444
69-
ARG JENKINS_SHA=ab093a455fc35951c9b46361002e17cc3ed7c59b0943bbee3a57a363f3370d2e
69+
ARG JENKINS_VERSION=2.504.1
70+
ARG JENKINS_SHA=81026db18b0c4aad6b62cf408e4c42e5797661b41c517b37df606238e89b9df1
7071
ARG JENKINS_PLUGIN_MANAGER_VERSION=2.12.13
7172
ARG PLUGIN_CLI_URL=https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/${JENKINS_PLUGIN_MANAGER_VERSION}/jenkins-plugin-manager-${JENKINS_PLUGIN_MANAGER_VERSION}.jar
7273

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<br>
99

10-
[What's New](https://github.com/oracle-devrel/cd3-automation-toolkit/releases/tag/v2024.4.3) &nbsp;&nbsp;[Excel Templates](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/excel-templates/) &nbsp;&nbsp;[CD3 Docs](https://oracle-devrel.github.io/cd3-automation-toolkit/)&nbsp;&nbsp; [Watch & Learn](https://www.youtube.com/playlist?list=PLPIzp-E1msrbJ3WawXVhzimQnLw5iafcp) &nbsp;&nbsp;[Blogs & Tutorials](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/tutorials/) &nbsp;&nbsp;[Livelabs](https://apexapps.oracle.com/pls/apex/f?p=133:180:112501098061930::::wid:3724) &nbsp;&nbsp;[Slack Channel](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/queries)
10+
[What's New](https://github.com/oracle-devrel/cd3-automation-toolkit/releases/tag/v2025.1.2) &nbsp;&nbsp;[Excel Templates](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/excel-templates/) &nbsp;&nbsp;[CD3 Docs](https://oracle-devrel.github.io/cd3-automation-toolkit/)&nbsp;&nbsp; [Watch & Learn](https://www.youtube.com/playlist?list=PLPIzp-E1msrbJ3WawXVhzimQnLw5iafcp) &nbsp;&nbsp;[Blogs & Tutorials](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/tutorials/) &nbsp;&nbsp;[Livelabs](https://apexapps.oracle.com/pls/apex/f?p=133:180:112501098061930::::wid:3724) &nbsp;&nbsp;[Slack Channel](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/queries)
1111

1212
<br>
1313

cd3_automation_toolkit/Compute/export_dedicatedvmhosts_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ def print_dedicatedvmhosts(region, dedicatedvmhost, values_for_column, ntk_compa
2424
# Tags filter
2525
defined_tags = dedicatedvmhost.defined_tags
2626
tags_list = []
27-
for tkey, tval in defined_tags.items():
28-
for kk, vv in tval.items():
29-
tag = tkey + "." + kk + "=" + vv
30-
tags_list.append(tag)
27+
if defined_tags:
28+
for tkey, tval in defined_tags.items():
29+
for kk, vv in tval.items():
30+
tag = tkey + "." + kk + "=" + vv
31+
tags_list.append(tag)
3132

3233
if export_tags == []:
3334
check = True

cd3_automation_toolkit/Compute/export_instances_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ def __get_instances_info(compartment_name, compartment_id, reg_name, display_nam
115115
# Tags filter
116116
ins_defined_tags = ins.defined_tags
117117
tags_list=[]
118-
for tkey,tval in ins_defined_tags.items():
119-
for kk,vv in tval.items():
120-
tag = tkey+"."+kk+"="+vv
121-
tags_list.append(tag)
118+
if ins_defined_tags:
119+
for tkey,tval in ins_defined_tags.items():
120+
for kk,vv in tval.items():
121+
tag = tkey+"."+kk+"="+vv
122+
tags_list.append(tag)
122123

123124
if export_tags == []:
124125
check = True

cd3_automation_toolkit/CostManagement/Budget/export_budgets_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,11 @@ def export_budgets_nongreenfield(inputfile, outdir, service_dir, config, signer,
159159
# Tags filter
160160
defined_tags = budget.defined_tags
161161
tags_list = []
162-
for tkey, tval in defined_tags.items():
163-
for kk, vv in tval.items():
164-
tag = tkey + "." + kk + "=" + vv
165-
tags_list.append(tag)
162+
if defined_tags:
163+
for tkey, tval in defined_tags.items():
164+
for kk, vv in tval.items():
165+
tag = tkey + "." + kk + "=" + vv
166+
tags_list.append(tag)
166167

167168
if export_tags == []:
168169
check = True

cd3_automation_toolkit/Database/export_adb_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,11 @@ def export_adbs(inputfile, outdir, service_dir, config, signer, ct, export_compa
180180
# Tags filter
181181
defined_tags = adb.defined_tags
182182
tags_list = []
183-
for tkey, tval in defined_tags.items():
184-
for kk, vv in tval.items():
185-
tag = tkey + "." + kk + "=" + vv
186-
tags_list.append(tag)
183+
if defined_tags:
184+
for tkey, tval in defined_tags.items():
185+
for kk, vv in tval.items():
186+
tag = tkey + "." + kk + "=" + vv
187+
tags_list.append(tag)
187188

188189
if export_tags==[]:
189190
check=True

cd3_automation_toolkit/Database/export_dbsystems_vm_bm_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,11 @@ def export_dbsystems_vm_bm(inputfile, outdir, service_dir, config, signer, ct, e
176176
# Tags filter
177177
defined_tags = db_system.defined_tags
178178
tags_list = []
179-
for tkey, tval in defined_tags.items():
180-
for kk, vv in tval.items():
181-
tag = tkey + "." + kk + "=" + vv
182-
tags_list.append(tag)
179+
if defined_tags:
180+
for tkey, tval in defined_tags.items():
181+
for kk, vv in tval.items():
182+
tag = tkey + "." + kk + "=" + vv
183+
tags_list.append(tag)
183184

184185
if export_tags == []:
185186
check = True

cd3_automation_toolkit/Database/export_exa_infra_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ def export_exa_infra(inputfile, outdir, service_dir, config, signer, ct, export_
108108
# Tags filter
109109
defined_tags = exa_infra.defined_tags
110110
tags_list = []
111-
for tkey, tval in defined_tags.items():
112-
for kk, vv in tval.items():
113-
tag = tkey + "." + kk + "=" + vv
114-
tags_list.append(tag)
111+
if defined_tags:
112+
for tkey, tval in defined_tags.items():
113+
for kk, vv in tval.items():
114+
tag = tkey + "." + kk + "=" + vv
115+
tags_list.append(tag)
115116

116117
if export_tags == []:
117118
check = True

cd3_automation_toolkit/Database/export_exa_vmclusters_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ def export_exa_vmclusters(inputfile, outdir, service_dir, config, signer, ct, ex
169169
# Tags filter
170170
defined_tags = exa_infra.defined_tags
171171
tags_list = []
172-
for tkey, tval in defined_tags.items():
173-
for kk, vv in tval.items():
174-
tag = tkey + "." + kk + "=" + vv
175-
tags_list.append(tag)
172+
if defined_tags:
173+
for tkey, tval in defined_tags.items():
174+
for kk, vv in tval.items():
175+
tag = tkey + "." + kk + "=" + vv
176+
tags_list.append(tag)
176177

177178
if export_tags == []:
178179
check = True

cd3_automation_toolkit/Database/export_mysql_configuration_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,11 @@ def export_mysql_configuration(inputfile, outdir, service_dir, config, signer, c
123123
# Tags filter
124124
defined_tags = config_obj.defined_tags
125125
tags_list = []
126-
for tkey, tval in defined_tags.items():
127-
for kk, vv in tval.items():
128-
tag = tkey + "." + kk + "=" + vv
129-
tags_list.append(tag)
126+
if defined_tags:
127+
for tkey, tval in defined_tags.items():
128+
for kk, vv in tval.items():
129+
tag = tkey + "." + kk + "=" + vv
130+
tags_list.append(tag)
130131

131132
if export_tags == []:
132133
check = True

cd3_automation_toolkit/Database/export_mysql_db_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,11 @@ def export_mysql_db(inputfile, outdir, service_dir, config, signer, ct, export_c
236236
# Tags filter
237237
defined_tags = mysql_db.defined_tags
238238
tags_list = []
239-
for tkey, tval in defined_tags.items():
240-
for kk, vv in tval.items():
241-
tag = tkey + "." + kk + "=" + vv
242-
tags_list.append(tag)
239+
if defined_tags:
240+
for tkey, tval in defined_tags.items():
241+
for kk, vv in tval.items():
242+
tag = tkey + "." + kk + "=" + vv
243+
tags_list.append(tag)
243244

244245
if export_tags == []:
245246
check = True

cd3_automation_toolkit/DeveloperServices/OKE/export_oke_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,11 @@ def export_oke(inputfile, outdir,service_dir, config, signer, ct, export_compart
546546
# Tags filter
547547
defined_tags = nodepool_info.defined_tags
548548
tags_list = []
549-
for tkey, tval in defined_tags.items():
550-
for kk, vv in tval.items():
551-
tag = tkey + "." + kk + "=" + vv
552-
tags_list.append(tag)
549+
if defined_tags:
550+
for tkey, tval in defined_tags.items():
551+
for kk, vv in tval.items():
552+
tag = tkey + "." + kk + "=" + vv
553+
tags_list.append(tag)
553554

554555
if export_tags == []:
555556
check = True

cd3_automation_toolkit/DeveloperServices/ResourceManager/create_resource_manager_stack.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,14 @@ def create_resource_manager(outdir,var_file, outdir_struct,prefix,auth_mechanism
346346
create_job_details.operation = "IMPORT_TF_STATE"
347347
create_job_details.stack_id = stack_ocid
348348
print("Uploading Terraform State file to Resource Manager for stack " + rm_name + "..............")
349-
ocs_stack.create_job(create_job_details)
349+
try:
350+
ocs_stack.create_job(create_job_details)
351+
except Exception as e:
352+
print("\n")
353+
print(str(e))
354+
if ('Request Entity Too Large' in str(e)):
355+
print("\nError!!! Skipping state import for Resource Manager stack "+rm_name)
356+
pass
350357

351358
rm_dir_zip = region_dir + '/' + prefix + '-' + region +'.zip'
352359
# Take a backup of zip file if it exists
@@ -458,7 +465,14 @@ def create_resource_manager(outdir,var_file, outdir_struct,prefix,auth_mechanism
458465
create_job_details.operation = "IMPORT_TF_STATE"
459466
create_job_details.stack_id = stack_ocid
460467
print("Uploading Terraform State file to Resource Manager for stack "+service_rm_name+"..............")
461-
ocs_stack.create_job(create_job_details)
468+
try:
469+
ocs_stack.create_job(create_job_details)
470+
except Exception as e:
471+
print("\n")
472+
print(str(e))
473+
if ('Request Entity Too Large' in str(e)):
474+
print("\nError!!! Skipping state import for Resource Manager stack " + service_rm_name)
475+
pass
462476

463477
shutil.rmtree(rm_dir + "/" + service_dir)
464478

cd3_automation_toolkit/Governance/Quota/export_quotas_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ def export_quotas_nongreenfield(inputfile, outdir, service_dir, config, signer,
8585
# Tags filter
8686
defined_tags = quota.defined_tags
8787
tags_list = []
88-
for tkey, tval in defined_tags.items():
89-
for kk, vv in tval.items():
90-
tag = tkey + "." + kk + "=" + vv
91-
tags_list.append(tag)
88+
if defined_tags:
89+
for tkey, tval in defined_tags.items():
90+
for kk, vv in tval.items():
91+
tag = tkey + "." + kk + "=" + vv
92+
tags_list.append(tag)
9293

9394
if export_tags == []:
9495
check = True

cd3_automation_toolkit/ManagementServices/EventsAndNotifications/export_events_notifications_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ def export_events(inputfile, outdir, service_dir, config, signer, ct,export_comp
234234
# Tags filter
235235
defined_tags = event_info.defined_tags
236236
tags_list = []
237-
for tkey, tval in defined_tags.items():
238-
for kk, vv in tval.items():
239-
tag = tkey + "." + kk + "=" + vv
240-
tags_list.append(tag)
237+
if defined_tags:
238+
for tkey, tval in defined_tags.items():
239+
for kk, vv in tval.items():
240+
tag = tkey + "." + kk + "=" + vv
241+
tags_list.append(tag)
241242

242243
if export_tags == []:
243244
check = True

cd3_automation_toolkit/ManagementServices/Monitoring/export_alarms_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@ def export_alarms(inputfile, outdir, service_dir, config, signer, ct, export_com
134134
# Tags filter
135135
defined_tags = alarm.defined_tags
136136
tags_list = []
137-
for tkey, tval in defined_tags.items():
138-
for kk, vv in tval.items():
139-
tag = tkey + "." + kk + "=" + vv
140-
tags_list.append(tag)
137+
if defined_tags:
138+
for tkey, tval in defined_tags.items():
139+
for kk, vv in tval.items():
140+
tag = tkey + "." + kk + "=" + vv
141+
tags_list.append(tag)
141142

142143
if export_tags == []:
143144
check = True

cd3_automation_toolkit/ManagementServices/ServiceConnectorHub/export_sch_nonGreenField.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ def get_comp_details(comp_data):
4343
# Tags filter
4444
defined_tags = sch_details.data.defined_tags
4545
tags_list = []
46-
for tkey, tval in defined_tags.items():
47-
for kk, vv in tval.items():
48-
tag = tkey + "." + kk + "=" + vv
49-
tags_list.append(tag)
46+
if defined_tags:
47+
for tkey, tval in defined_tags.items():
48+
for kk, vv in tval.items():
49+
tag = tkey + "." + kk + "=" + vv
50+
tags_list.append(tag)
5051

5152
if export_tags == []:
5253
check = True

cd3_automation_toolkit/Network/BaseNetwork/exportNSG.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,11 @@ def export_nsg(inputfile, outdir, service_dir,config,signer, ct, export_compartm
218218
# Tags filter
219219
defined_tags = vcn.defined_tags
220220
tags_list = []
221-
for tkey, tval in defined_tags.items():
222-
for kk, vv in tval.items():
223-
tag = tkey + "." + kk + "=" + vv
224-
tags_list.append(tag)
221+
if defined_tags:
222+
for tkey, tval in defined_tags.items():
223+
for kk, vv in tval.items():
224+
tag = tkey + "." + kk + "=" + vv
225+
tags_list.append(tag)
225226

226227
if export_tags == []:
227228
check = True
@@ -242,10 +243,11 @@ def export_nsg(inputfile, outdir, service_dir,config,signer, ct, export_compartm
242243
# Tags filter
243244
defined_tags = nsg.defined_tags
244245
tags_list = []
245-
for tkey, tval in defined_tags.items():
246-
for kk, vv in tval.items():
247-
tag = tkey + "." + kk + "=" + vv
248-
tags_list.append(tag)
246+
if defined_tags:
247+
for tkey, tval in defined_tags.items():
248+
for kk, vv in tval.items():
249+
tag = tkey + "." + kk + "=" + vv
250+
tags_list.append(tag)
249251

250252
if export_tags == []:
251253
check = True

0 commit comments

Comments
 (0)