39 строки
1.7 KiB
YAML
39 строки
1.7 KiB
YAML
parameters:
|
|
name: '' # in the form type_platform_host
|
|
displayName: '' # the human name
|
|
vmImage: '' # the VM image
|
|
condition: succeeded() # whether or not to run this template
|
|
buildExternals: '' # the build number to download externals from
|
|
postBuildSteps: [] # any additional steps to run after the build
|
|
|
|
jobs:
|
|
- job: ${{ parameters.name }}
|
|
displayName: ${{ parameters.displayName }}
|
|
pool:
|
|
vmImage: ${{ parameters.vmImage }}
|
|
condition: ${{ parameters.condition }}
|
|
steps:
|
|
- checkout: none
|
|
- task: DownloadBuildArtifacts@0
|
|
displayName: Download the pre-built ${{ parameters.name }} artifacts
|
|
inputs:
|
|
buildType: 'specific'
|
|
project: '$(System.TeamProjectId)'
|
|
pipeline: '$(System.DefinitionId)'
|
|
buildVersionToDownload: 'specific'
|
|
buildId: '${{ parameters.buildExternals }}'
|
|
downloadType: 'single'
|
|
artifactName: ${{ parameters.name }}
|
|
downloadPath: 'download-temp'
|
|
- pwsh: |
|
|
New-Item '.\output\' -Type Directory -Force | Out-Null
|
|
Get-ChildItem '.\download-temp\${{ parameters.name }}\' | Copy-Item -Destination '.\output\' -Recurse -Force
|
|
Remove-Item '.\download-temp\${{ parameters.name }}\' -Recurse -Force
|
|
displayName: Move the ${{ parameters.name }} artifacts to the output directory
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish the ${{ parameters.name }} artifacts
|
|
inputs:
|
|
artifactName: ${{ parameters.name }}
|
|
pathToPublish: 'output'
|
|
- ${{ parameters.postBuildSteps }}
|