msbuild
28 строк · 1.2 Кб
1parameters:
2# Optional azure devops PAT with build execute permissions for the build's organization,
3# only needed if the build that should be retained ran on a different organization than
4# the pipeline where this template is executing from
5Token: ''
6# Optional BuildId to retain, defaults to the current running build
7BuildId: ''
8# Azure devops Organization URI for the build in the https://dev.azure.com/<organization> format.
9# Defaults to the organization the current pipeline is running on
10AzdoOrgUri: '$(System.CollectionUri)'
11# Azure devops project for the build. Defaults to the project the current pipeline is running on
12AzdoProject: '$(System.TeamProject)'
13
14steps:
15- task: powershell@2
16inputs:
17targetType: 'filePath'
18filePath: eng/common/retain-build.ps1
19pwsh: true
20arguments: >
21-AzdoOrgUri: ${{parameters.AzdoOrgUri}}
22-AzdoProject ${{parameters.AzdoProject}}
23-Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }}
24-BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}}
25displayName: Enable permanent build retention
26env:
27SYSTEM_ACCESSTOKEN: $(System.AccessToken)
28BUILD_ID: $(Build.BuildId)