Skip to content

Commit b9c3854

Browse files
Merge pull request #2681 from ashwindasr/rffbc-add-job-url-to-mr
release-from-fbc: include Jenkins job URL in shipment MR description
2 parents bfd165f + a56b003 commit b9c3854

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyartcd/pyartcd/pipelines/release_from_fbc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def __init__(
9393
self.gitlab_url = self.runtime.config.get("gitlab_url", "https://gitlab.cee.redhat.com")
9494
self.gitlab_token = None
9595
self.shipment_mr_url = None
96+
self.job_url = None
9697

9798
# Product configuration - initialized to None, will be loaded from group config in run()
9899
self.product = None
@@ -191,6 +192,8 @@ def check_env_vars(self):
191192
raise ValueError("GITLAB_TOKEN environment variable is required to create a merge request")
192193
self.gitlab_token = gitlab_token
193194

195+
self.job_url = os.getenv('BUILD_URL')
196+
194197
def setup_working_dir(self):
195198
"""
196199
Setup working directories, cleaning up any existing ones.
@@ -579,7 +582,8 @@ async def create_shipment_mr(self, shipments_by_kind: Dict[str, ShipmentConfig],
579582
mr_title = f"Draft: Shipment for {self.product} {self.assembly} (ship date: {self.target_release_date})"
580583
else:
581584
mr_title = f"Draft: Shipment for {self.product} {self.assembly}"
582-
mr_description = f"Shipment files created for {self.assembly} using release-from-fbc command"
585+
mr_description = f"Created by job: {self.job_url}\n\n" if self.job_url else ""
586+
mr_description += f"Shipment files created for {self.assembly} using release-from-fbc command"
583587

584588
if self.dry_run:
585589
self.logger.info("[DRY-RUN] Would have created MR with title: %s", mr_title)

0 commit comments

Comments
 (0)