diff --git a/src/main/resources/templates/slack-incoming-message.ftl b/src/main/resources/templates/slack-incoming-message.ftl index 286ec3c..413d034 100644 --- a/src/main/resources/templates/slack-incoming-message.ftl +++ b/src/main/resources/templates/slack-incoming-message.ftl @@ -1,4 +1,9 @@ -<#assign message="<${executionData.href}|Execution #${executionData.id}> of job <${executionData.job.href}|${executionData.job.name}>"> +<#if executionData.job.group??> + <#assign jobName="${executionData.job.group} / ${executionData.job.name}"> +<#else> + <#assign jobName="${executionData.job.name}"> + +<#assign message="<${executionData.href}|Execution #${executionData.id}> of job <${executionData.job.href}|${jobName}>"> <#if trigger == "start"> <#assign state="Started"> <#elseif trigger == "failure"> @@ -6,6 +11,7 @@ <#else> <#assign state="Succeeded"> + { "attachments":[ { @@ -15,7 +21,7 @@ "fields":[ { "title":"Job Name", - "value":"<${executionData.job.href}|${executionData.job.name}>", + "value":"<${executionData.job.href}|${jobName}>", "short":true }, {