Skip to content

Commit

Permalink
adding profile type (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
paigerube14 authored Oct 17, 2024
1 parent 4292a13 commit f75ef39
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions prow/generate_jobs_in_gsheet/get_periodic_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def get_multiaz(yaml_file):
return "true"


def get_profile(yaml_file):
if "cluster_profile" in yaml_file['steps'].keys():
return yaml_file['steps']['cluster_profile']
return "no profile"

def get_cloud_type(yaml_file):

if "workflow" in yaml_file['steps'].keys():
Expand Down Expand Up @@ -220,7 +225,8 @@ def test_profile(folder_path, fileName):

worker_size = get_worker_type(test)
profile_set = get_profile_type(test)
row = [test['as'], type, arch_type, version, stream, worker_count, worker_size, profile_set, '"' + cron_cadence +'"', cron_in_words, job_url]
profile_name = get_profile(test)
row = [test['as'], profile_name, type, arch_type, version, stream, worker_count, worker_size, profile_set, '"' + cron_cadence +'"', cron_in_words, job_url]
final_row.append(row)
return final_row

Expand Down Expand Up @@ -249,6 +255,7 @@ def test_profile(folder_path, fileName):
invoke("cd release_master; git clone https://github.com/openshift/release.git --depth=1")
jobs_folder_path=f"./release_master/release/ci-operator/config/{jobs_folder_location}"


# Check if the folder exists
if os.path.exists(jobs_folder_path) and os.path.isdir(jobs_folder_path):
# Check if the folder is not empty
Expand All @@ -264,7 +271,7 @@ def test_profile(folder_path, fileName):
file_names = invoke("ls " + jobs_folder_path)

all_rows = []
all_rows.append(["Test Name", "Cloud Type", "Arch Type", "Version", "Stream type", "Worker_count", "Worker Size", "Profile", 'Cron Cadence', "Cron In Words", "Job history Url"])
all_rows.append(["Test Name", "Profile", "Cloud Type", "Arch Type", "Version", "Stream type", "Worker_count", "Worker Size", "Profile", 'Cron Cadence', "Cron In Words", "Job history Url"])
for file_name in file_names.split():
if file_name != "OWNERS":
print("file name " + str(file_name))
Expand Down

0 comments on commit f75ef39

Please sign in to comment.