Skip to content

Commit b2d7e9e

Browse files
[patch]fix message
1 parent 0f35b92 commit b2d7e9e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

bin/mas-devops-notify-slack

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ def notifyPipelineStart(channels: list[str], instanceId: str | None = None, pipe
112112

113113
# Send pipeline started message to all channels
114114
toolchainLink = _getToolchainLink()
115-
instanceInfo = f"\nInstance ID: `{instanceId}`" if instanceId else ""
115+
instanceInfo = f"Instance ID: `{instanceId}`" if instanceId else ""
116116
message = [
117117
SlackUtil.buildHeader(f"🚀 MAS {pipelineName} Pipeline Started"),
118-
SlackUtil.buildSection(f"Pipeline Run: {instanceInfo}\n{toolchainLink}")
118+
SlackUtil.buildSection(f"Pipeline Run: {pipelineName}\n{instanceInfo}\n{toolchainLink}")
119119
]
120120
response = SlackUtil.postMessageBlocks(channels, message)
121121

122122
# Store thread information for all channels in ConfigMap
123-
configMapData = {"instanceId": instanceId}
123+
configMapData = {"instanceId": instanceId, "pipelineName": pipelineName}
124124

125125
if isinstance(response, list):
126126
# Multiple channels - store each channel's thread info
@@ -323,7 +323,7 @@ def notifyPipelineComplete(channels: list[str], rc: int, instanceId: str | None
323323
except Exception:
324324
pass
325325

326-
instanceInfo = f"\nInstance ID: `{instanceId}`" if instanceId else ""
326+
instanceInfo = f"Instance ID: `{instanceId}`" if instanceId else ""
327327
if rc == 0:
328328
emoji = "🎉"
329329
status = "Completed Successfully"
@@ -335,7 +335,7 @@ def notifyPipelineComplete(channels: list[str], rc: int, instanceId: str | None
335335

336336
message = [
337337
SlackUtil.buildHeader(f"{emoji} MAS {pipelineName} Pipeline {status}"),
338-
SlackUtil.buildSection(f"Pipeline Run: {instanceInfo}{durationText}{additionalInfo}")
338+
SlackUtil.buildSection(f"Pipeline Run: {pipelineName}\n{instanceInfo}{durationText}{additionalInfo}")
339339
]
340340

341341
allSuccess = True

0 commit comments

Comments
 (0)