Skip to content

Commit

Permalink
added constant file
Browse files Browse the repository at this point in the history
  • Loading branch information
alokgoswami-ag committed Dec 13, 2024
1 parent c8cd0cc commit 53df79d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PROW_VIEW_URL = "https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs"
JOB_LINK_URL= "https://prow.ci.openshift.org/"
8 changes: 4 additions & 4 deletions monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import requests
from datetime import datetime
import xml.etree.ElementTree as ET
from constants import PROW_VIEW_URL,JOB_LINK_URL

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
PROW_URL = ""
PROW_VIEW_URL = "https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs"
final_job_list=[]

def set_prow_url(ci_job_type: str)->str:
Expand All @@ -23,9 +23,9 @@ def set_prow_url(ci_job_type: str)->str:
string: Value of PROW_URL
'''
if ci_job_type == 'p' or ci_job_type == 'z':
return "https://prow.ci.openshift.org/job-history/gs/origin-ci-test/logs/"
return JOB_LINK_URL+"job-history/gs/origin-ci-test/logs/"
elif ci_job_type == 'pa':
return "https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/"
return JOB_LINK_URL+"job-history/gs/test-platform-results/logs/"

def load_config(config_file):

Expand Down Expand Up @@ -1229,7 +1229,7 @@ def get_detailed_job_info(build_list,prow_ci_name,zone=None):
builds_to_deleted.append(build)
continue
i=i+1
print(i,"Job link: https://prow.ci.openshift.org/"+build)
print(i,"Job link:"+JOB_LINK_URL+build)

build_status = check_job_status(build)
sensitive_info_expose_status=check_if_sensitive_info_exposed(build)
Expand Down

0 comments on commit 53df79d

Please sign in to comment.