Skip to content

Commit ee59058

Browse files
committed
Use a different link in bugs create from private deck jobs
1 parent c11a218 commit ee59058

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/objects/job.py

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def __init__(
5757
else:
5858
self.pr_id = ""
5959
self.firewatch_config = firewatch_config
60+
self.is_private_deck = True if gcs_creds_file else False
6061

6162
# Set GCS bucket values
6263
self.gcs_bucket = gcs_bucket

src/report/report.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def file_jira_issues(
150150
step_name=pair["failure"].step, # type: ignore
151151
failure_type=pair["failure"].failure_type, # type: ignore
152152
classification=pair["rule"].classification, # type: ignore
153-
job_name=job.name, # type: ignore
154-
build_id=job.build_id, # type: ignore
153+
job=job, # type: ignore
155154
failed_test_name=(
156155
pair["failure"].failed_test_name # type: ignore
157156
if firewatch_config.verbose_test_failure_reporting
@@ -256,8 +255,7 @@ def report_success(self, job: Job, firewatch_config: Configuration) -> None:
256255
project=rule.jira_project,
257256
summary=f"Job {job.name} passed - {date.strftime('%m-%d-%Y')}",
258257
description=self._get_issue_description(
259-
job_name=job.name, # type: ignore
260-
build_id=job.build_id, # type: ignore
258+
job=job, # type: ignore
261259
success_issue=True,
262260
),
263261
issue_type="Story",
@@ -515,8 +513,7 @@ def _get_file_attachments(
515513

516514
def _get_issue_description(
517515
self,
518-
job_name: str,
519-
build_id: str,
516+
job: Job,
520517
step_name: Optional[str] = None,
521518
failure_type: Optional[str] = None,
522519
classification: Optional[str] = None,
@@ -539,8 +536,13 @@ def _get_issue_description(
539536
Returns:
540537
str: String object representing the description.
541538
"""
542-
link_line = f"*Prow Job Link:* [{job_name} #{build_id}|https://prow.ci.openshift.org/view/gs/test-platform-results/logs/{job_name}/{build_id}]"
543-
build_id_line = f"*Build ID:* {build_id}"
539+
link_line_base_url = (
540+
"https://qe-private-deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gs/qe-private-deck/logs/"
541+
if job.is_private_deck
542+
else "https://prow.ci.openshift.org/view/gs/test-platform-results/logs/"
543+
)
544+
link_line = f"*Prow Job Link:* [{job.name} #{job.build_id}|{link_line_base_url}{job.name}/{job.build_id}]"
545+
build_id_line = f"*Build ID:* {job.build_id}"
544546
firewatch_link_line = f"This {'issue' if success_issue else 'bug'} was filed using [firewatch in OpenShift CI|https://github.com/CSPI-QE/firewatch]"
545547

546548
# If the issue is being created for a failure

0 commit comments

Comments
 (0)