ci: post gantt: add pipeline-id to gantt filename

Add a pipeline-id to the gantt filename so that the filename is unique.
Reduce the additional info provided in the gantt comments since the tool
is now more familiar to developers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
This commit is contained in:
Deborah Brouwer
2024-12-13 17:25:04 -08:00
committed by Deb_1543
parent 127a8aa9c3
commit 4ae2105fcb

View File

@@ -48,8 +48,6 @@ def pretty_time(time_str: str) -> str:
def compose_message(file_name: str, attachment_url: str) -> str:
return f"""
Here is the Gantt chart for the referred pipeline, I hope it helps 😄 (tip: click on the "Pan" button on the top right bar):
[{file_name}]({attachment_url})
<details>
@@ -149,7 +147,7 @@ def main(
pipeline, _ = get_gitlab_pipeline_from_url(gl, pipeline_url)
log.info("Generating gantt chart...")
fig = generate_gantt_chart(pipeline)
file_name = "Gantt.html"
file_name = f"{str(pipeline.id)}-Gantt.html"
fig.write_html(file_name)
log.info("Uploading gantt file...")
file_url = gitlab_upload_file_get_url(gl, event.project_id, file_name)