diff --git a/azure-pipelines/templates/get-tool-versions-steps.yml b/azure-pipelines/templates/get-tool-versions-steps.yml index 8e199f7..7cf41a6 100644 --- a/azure-pipelines/templates/get-tool-versions-steps.yml +++ b/azure-pipelines/templates/get-tool-versions-steps.yml @@ -23,7 +23,7 @@ steps: - task: PowerShell@2 displayName: 'Change build name' - condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], '')) + #condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], '')) inputs: TargetType: inline script: | @@ -31,14 +31,14 @@ steps: Write-Host "##vso[build.updatebuildnumber]$newBuildName" - task: PowerShell@2 - displayName: 'Send Slack notification' - condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], '')) - inputs: - targetType: filePath - filePath: './get-new-tool-versions/send-slack-notification.ps1' - arguments: | - -Url "$(SLACK_CHANNEL_URL)" ` - -ToolName "$(TOOL_NAME)" ` - -ToolVersion "$(Get_versions.TOOL_VERSIONS)" ` - -PipelineUrl "${{ variables.PIPELINE_URL }}" ` + displayName: 'Send Slack notification' + #condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], '')) + inputs: + targetType: filePath + filePath: './get-new-tool-versions/send-slack-notification.ps1' + arguments: | + -Url "$(SLACK_CHANNEL_URL)" ` + -ToolName "$(TOOL_NAME)" ` + -ToolVersion "$(Get_versions.TOOL_VERSIONS)" ` + -PipelineUrl "$(PipelineUrl)" ` -ImageUrl "$(IMAGE_URL)" \ No newline at end of file diff --git a/get-new-tool-versions/send-slack-notification.ps1 b/get-new-tool-versions/send-slack-notification.ps1 index 0c6e57e..050af3e 100644 --- a/get-new-tool-versions/send-slack-notification.ps1 +++ b/get-new-tool-versions/send-slack-notification.ps1 @@ -36,7 +36,7 @@ Import-Module $PSScriptRoot/helpers.psm1 -DisableNameChecking # Create JSON body $text = "The following versions of '$toolName' are available to upload: $toolVersion" -if ($PipelineUrl) { +if (-not ([string]::IsNullOrWhiteSpace($PipelineUrl))) { $text += "\nLink to the pipeline: $pipelineUrl" } $jsonBodyMessage = @"