2018-12-04 17:31:23 +00:00
|
|
|
parameters:
|
|
|
|
configuration: 'Debug'
|
|
|
|
|
|
|
|
# Optional: condition for the job to run
|
|
|
|
condition: ''
|
|
|
|
|
|
|
|
# Optional: 'true' if future jobs should run even if this job fails
|
|
|
|
continueOnError: false
|
|
|
|
|
2018-12-19 20:55:42 +00:00
|
|
|
# Optional: dependencies of the job
|
|
|
|
dependsOn: ''
|
|
|
|
|
|
|
|
# Optional: Include PublishBuildArtifacts task
|
|
|
|
enablePublishBuildArtifacts: false
|
|
|
|
|
|
|
|
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
|
|
|
|
pool: {}
|
|
|
|
|
2018-12-04 17:31:23 +00:00
|
|
|
# Optional: should run as a public build even in the internal project
|
|
|
|
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
|
|
|
|
runAsPublic: false
|
|
|
|
|
2019-03-21 12:33:28 +00:00
|
|
|
# Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing
|
|
|
|
publishUsingPipelines: false
|
|
|
|
|
2018-12-04 17:31:23 +00:00
|
|
|
jobs:
|
|
|
|
- job: Asset_Registry_Publish
|
|
|
|
|
|
|
|
dependsOn: ${{ parameters.dependsOn }}
|
|
|
|
|
|
|
|
displayName: Publish to Build Asset Registry
|
|
|
|
|
|
|
|
pool: ${{ parameters.pool }}
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- name: _BuildConfig
|
|
|
|
value: ${{ parameters.configuration }}
|
|
|
|
- group: Publish-Build-Assets
|
2021-01-09 13:53:15 +00:00
|
|
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
2020-03-17 16:01:58 +00:00
|
|
|
- name: runCodesignValidationInjection
|
|
|
|
value: false
|
2018-12-04 17:31:23 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: Download artifact
|
|
|
|
inputs:
|
|
|
|
artifactName: AssetManifests
|
|
|
|
downloadPath: '$(Build.StagingDirectory)/Download'
|
2021-03-11 13:55:56 +00:00
|
|
|
checkDownloadedFiles: true
|
2018-12-04 17:31:23 +00:00
|
|
|
condition: ${{ parameters.condition }}
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
2019-09-06 13:10:41 +00:00
|
|
|
|
|
|
|
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- task: NuGetAuthenticate@0
|
|
|
|
|
2021-01-09 13:53:15 +00:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Enable cross-org NuGet feed authentication
|
|
|
|
inputs:
|
|
|
|
filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
|
|
|
|
arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw)
|
|
|
|
|
2019-02-05 13:42:55 +00:00
|
|
|
- task: PowerShell@2
|
2018-12-04 17:31:23 +00:00
|
|
|
displayName: Publish Build Assets
|
2019-02-05 13:42:55 +00:00
|
|
|
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
|
2019-03-21 12:33:28 +00:00
|
|
|
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
|
2019-02-05 13:42:55 +00:00
|
|
|
/p:Configuration=$(_BuildConfig)
|
2020-09-01 13:00:44 +00:00
|
|
|
/p:OfficialBuildId=$(Build.BuildNumber)
|
2018-12-04 17:31:23 +00:00
|
|
|
condition: ${{ parameters.condition }}
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
2019-09-06 13:10:41 +00:00
|
|
|
|
2019-06-13 12:10:50 +00:00
|
|
|
- task: powershell@2
|
2019-06-22 12:29:08 +00:00
|
|
|
displayName: Create ReleaseConfigs Artifact
|
2019-06-13 12:10:50 +00:00
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
2019-06-22 12:29:08 +00:00
|
|
|
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId)
|
|
|
|
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)"
|
|
|
|
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild)
|
2019-09-06 13:10:41 +00:00
|
|
|
|
2019-06-13 12:10:50 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
2019-06-22 12:29:08 +00:00
|
|
|
displayName: Publish ReleaseConfigs Artifact
|
2019-06-13 12:10:50 +00:00
|
|
|
inputs:
|
2019-06-22 12:29:08 +00:00
|
|
|
PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt'
|
2019-06-13 12:10:50 +00:00
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: ReleaseConfigs
|
2021-08-07 13:00:09 +00:00
|
|
|
|
|
|
|
- task: powershell@2
|
|
|
|
displayName: Check if SymbolPublishingExclusionsFile.txt exists
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
$symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt"
|
|
|
|
if(Test-Path -Path $symbolExclusionfile)
|
|
|
|
{
|
|
|
|
Write-Host "SymbolExclusionFile exists"
|
|
|
|
Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true"
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
Write-Host "Symbols Exclusion file does not exists"
|
|
|
|
Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false"
|
|
|
|
}
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish SymbolPublishingExclusionsFile Artifact
|
|
|
|
condition: eq(variables['SymbolExclusionFile'], 'true')
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: ReleaseConfigs
|
|
|
|
|
2018-12-19 20:55:42 +00:00
|
|
|
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
|
2020-09-01 13:00:44 +00:00
|
|
|
- template: /eng/common/templates/steps/publish-logs.yml
|
|
|
|
parameters:
|
|
|
|
JobLabel: 'Publish_Artifacts_Logs'
|