private/Get-BuildMessage.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function Get-BuildMessage {
    # [CmdletBinding()]
    # param(
    # [Switch]$Start,
    # [Switch]$Stop,
    # [Switch]$Success,
    # [Switch]$Failed,
    # [Switch]$StopSuccess,
    # [Switch]$StopFailed
    # )

    # Switch ($PSBoundParameters.Keys)
    # {
    # 'Start' { $iconUrl = ":bomb:" }
    # 'Stop' { $iconUrl = "$($Script:BuildHelper.SlackIconBaseUrl)/stop.png" }
    # 'Success' { $iconUrl = ":white_check_mark:" }
    # 'Failed' { $iconUrl = ":x:" }
    # 'StopSuccess' { $iconUrl = ":eight_spoked_asterisk:" }
    # 'StopFailed' { $iconUrl = ":bomb:" }
    # }

    @{
        Channel = $Script:BuildHelper.SlackChannel
        IconUrl = "$($Script:BuildHelper.SlackIconBaseUrl)/invoke-build-logo-75.png"
        AsUser = $false
        Username = $Script:BuildHelper.SlackBotUsername   
    }
}