a b/assets/slackreport.json
1
{
2
    "attachments": [
3
        {
4
            "fallback": "Plain-text summary of the attachment.",
5
            "color": "<% if (success) { %>good<% } else { %>danger<%} %>",
6
            "author_name": "nf-core/deepmodeloptim ${version} - ${runName}",
7
            "author_icon": "https://www.nextflow.io/docs/latest/_static/favicon.ico",
8
            "text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors<% } %>",
9
            "fields": [
10
                {
11
                    "title": "Command used to launch the workflow",
12
                    "value": "```${commandLine}```",
13
                    "short": false
14
                }
15
                <%
16
                    if (!success) { %>
17
                    ,
18
                    {
19
                        "title": "Full error message",
20
                        "value": "```${errorReport}```",
21
                        "short": false
22
                    },
23
                    {
24
                        "title": "Pipeline configuration",
25
                        "value": "<% out << summary.collect{ k,v -> k == "hook_url" ? "_${k}_: (_hidden_)" : ( ( v.class.toString().contains('Path') || ( v.class.toString().contains('String') && v.contains('/') ) ) ? "_${k}_: `${v}`" : (v.class.toString().contains('DateTime') ? ("_${k}_: " + v.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM))) : "_${k}_: ${v}") ) }.join(",\n") %>",
26
                        "short": false
27
                    }
28
                    <% }
29
                %>
30
            ],
31
            "footer": "Completed at <% out << dateComplete.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM)) %> (duration: ${duration})"
32
        }
33
    ]
34
}