From 32fbb879151a10a7d554e5950405d001975d0d3c Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Mon, 21 Dec 2020 09:23:39 +0300 Subject: [PATCH] Update check-versions.yml --- azure-pipelines/templates/check-versions.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/azure-pipelines/templates/check-versions.yml b/azure-pipelines/templates/check-versions.yml index 6cf8969..c7ad39f 100644 --- a/azure-pipelines/templates/check-versions.yml +++ b/azure-pipelines/templates/check-versions.yml @@ -5,7 +5,15 @@ steps: inputs: TargetType: inline script: | - throw "No new versions were found" + Write-Host "No new versions were found" + Import-Module "./azure-devops/azure-devops-api.ps1" + + $azureDevOpsApi = Get-AzureDevOpsApi -TeamFoundationCollectionUri $(System.TeamFoundationCollectionUri) ` + -ProjectName $(System.TeamProject) ` + -AccessToken $(System.AccessToken) + + $AzureDevOpsApi.UpdateBuildStatus($(Build.BuildId), 'Cancelling') | Out-Null + Start-Sleep -Seconds 60 - task: PowerShell@2 displayName: 'Set PIPELINE_URL variable'