dotnet-installer/eng/common/templates/phases/publish-build-assets.yml

53 lines
2.2 KiB
YAML
Raw Normal View History

2018-10-22 05:07:26 +00:00
parameters:
dependsOn: ''
queue: {}
2018-11-08 01:51:56 +00:00
configuration: 'Debug'
condition: succeeded()
continueOnError: false
runAsPublic: false
publishUsingPipelines: false
2018-10-22 05:07:26 +00:00
phases:
- phase: Asset_Registry_Publish
displayName: Publish to Build Asset Registry
dependsOn: ${{ parameters.dependsOn }}
queue: ${{ parameters.queue }}
2018-11-08 01:51:56 +00:00
variables:
2018-12-04 17:31:23 +00:00
_BuildConfig: ${{ parameters.configuration }}
2018-10-22 05:07:26 +00:00
steps:
2018-11-08 01:51:56 +00:00
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
2018-10-22 05:07:26 +00:00
- task: DownloadBuildArtifacts@0
displayName: Download artifact
inputs:
artifactName: AssetManifests
downloadPath: '$(Build.StagingDirectory)/Download'
checkDownloadedFiles: true
2018-11-08 01:51:56 +00:00
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
2018-10-22 05:07:26 +00:00
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'MaestroAccessToken'
2018-11-08 01:51:56 +00:00
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- task: PowerShell@2
2018-11-08 01:51:56 +00:00
displayName: Publish Build Assets
inputs:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
/p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
/p:Configuration=$(_BuildConfig)
2018-11-08 01:51:56 +00:00
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
2018-12-04 17:31:23 +00:00
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: $(Agent.Os)_Asset_Registry_Publish
continueOnError: true
condition: always()