mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 11:41:23 +00:00
Remove extra code from yml
This commit is contained in:
@@ -9,9 +9,7 @@ steps:
|
|||||||
-DistURL "$(DIST_URL)" `
|
-DistURL "$(DIST_URL)" `
|
||||||
-ManifestLink "$(MANIFEST_URL)" `
|
-ManifestLink "$(MANIFEST_URL)" `
|
||||||
-VersionFilterToInclude $(INCLUDE_FILTER) `
|
-VersionFilterToInclude $(INCLUDE_FILTER) `
|
||||||
-VersionFilterToExclude $(EXCLUDE_FILTER) `
|
-VersionFilterToExclude $(EXCLUDE_FILTER)
|
||||||
-RetryIntervalSec $(INTERVAL_SEC) `
|
|
||||||
-RetryCount $(RETRY_COUNT)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Cancel build'
|
displayName: 'Cancel build'
|
||||||
@@ -22,22 +20,18 @@ steps:
|
|||||||
Import-Module "./azure-devops/azure-devops-api.ps1"
|
Import-Module "./azure-devops/azure-devops-api.ps1"
|
||||||
$azureDevOpsApi = Get-AzureDevOpsApi -TeamFoundationCollectionUri $(System.TeamFoundationCollectionUri) `
|
$azureDevOpsApi = Get-AzureDevOpsApi -TeamFoundationCollectionUri $(System.TeamFoundationCollectionUri) `
|
||||||
-ProjectName $(System.TeamProject) `
|
-ProjectName $(System.TeamProject) `
|
||||||
-AccessToken $(System.AccessToken) `
|
-AccessToken $(System.AccessToken)
|
||||||
-RetryCount $(INTERVAL_SEC) `
|
|
||||||
-RetryIntervalSec $(RETRY_COUNT)
|
|
||||||
|
|
||||||
$AzureDevOpsApi.UpdateBuildStatus($(Build.BuildId), 'Cancelling') | Out-Null
|
$AzureDevOpsApi.UpdateBuildStatus($(Build.BuildId), 'Cancelling') | Out-Null
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Set env variables'
|
displayName: 'Set env variable'
|
||||||
condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], ''))
|
condition: and(succeeded(), ne(variables['Get_versions.TOOL_VERSIONS'], ''))
|
||||||
inputs:
|
inputs:
|
||||||
TargetType: inline
|
TargetType: inline
|
||||||
script: |
|
script: |
|
||||||
$PipelineUrl = "$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"
|
$PipelineUrl = "$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"
|
||||||
Write-Output "##vso[task.setvariable variable=PIPELINE_URL]$PipelineUrl"
|
Write-Output "##vso[task.setvariable variable=PIPELINE_URL]$PipelineUrl"
|
||||||
$toolVersion = "$(Get_versions.TOOL_VERSIONS)".Replace(",",", ")
|
|
||||||
Write-Output "##vso[task.setvariable variable=TOOL_VERSIONS]$toolVersion"
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Send Slack notification'
|
displayName: 'Send Slack notification'
|
||||||
@@ -48,6 +42,6 @@ steps:
|
|||||||
arguments: |
|
arguments: |
|
||||||
-Url "$(SLACK_CHANNEL_URL)" `
|
-Url "$(SLACK_CHANNEL_URL)" `
|
||||||
-ToolName "$(TOOL_NAME)" `
|
-ToolName "$(TOOL_NAME)" `
|
||||||
-ToolVersion "$(TOOL_VERSIONS)" `
|
-ToolVersion "$(Get_versions.TOOL_VERSIONS)" `
|
||||||
-PipelineUrl "$(PIPELINE_URL)" `
|
-PipelineUrl "$(PIPELINE_URL)" `
|
||||||
-ImageUrl "$(IMAGE_URL)"
|
-ImageUrl "$(IMAGE_URL)"
|
||||||
|
|||||||
@@ -72,8 +72,9 @@ $versionsToBuild = Skip-ExistingVersions -VersionsFromManifest $versionsFromMani
|
|||||||
|
|
||||||
if ($versionsToBuild) {
|
if ($versionsToBuild) {
|
||||||
$availableVersions = $versionsToBuild -join ","
|
$availableVersions = $versionsToBuild -join ","
|
||||||
Write-Host "The following versions are available to build:`n$availableVersions"
|
$toolVersions = $availableVersions.Replace(",",", ")
|
||||||
Write-Output "##vso[task.setvariable variable=TOOL_VERSIONS;isOutput=true]$availableVersions"
|
Write-Host "The following versions are available to build:`n$toolVersions"
|
||||||
|
Write-Output "##vso[task.setvariable variable=TOOL_VERSIONS;isOutput=true]$toolVersions"
|
||||||
} else {
|
} else {
|
||||||
Write-Host "There aren't versions to build"
|
Write-Host "There aren't versions to build"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user