You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
versions-package-tools/azure-pipelines/templates/get-tool-versions-steps.yml

44 lines
1.4 KiB
YAML

steps:
- task: PowerShell@2
displayName: 'Get new versions'
name: 'Get_versions'
inputs:
targetType: filePath
filePath: './get-new-tool-versions/get-new-tool-versions.ps1'
arguments: |
4 years ago
-ToolName "$(TOOL_NAME)"
- task: PowerShell@2
displayName: 'Set PIPELINE_URL variable'
inputs:
TargetType: inline
script: |
$ToolName = "$(TOOL_NAME)"
4 years ago
if ($ToolName -eq "Python") {
$PipelineUrl = " "
} else {
$PipelineUrl = "$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"
}
4 years ago
Write-Host "##vso[task.setvariable variable=PIPELINE_URL]$PipelineUrl"
- task: PowerShell@2
displayName: 'Change build name'
4 years ago
#condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], ''))
4 years ago
inputs:
TargetType: inline
script: |
$newBuildName = "[FOUND] $(Build.BuildNumber)"
Write-Host "##vso[build.updatebuildnumber]$newBuildName"
4 years ago
- task: PowerShell@2
4 years ago
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 "$(PIPELINE_URL)" `
4 years ago
-ImageUrl "$(IMAGE_URL)"