e81393bd11
[main] Update dependencies from dotnet/arcade - Coherency Updates: - Microsoft.DotNet.XliffTasks: from 1.0.0-beta.21380.1 to 1.0.0-beta.21405.1 (parent: Microsoft.DotNet.Arcade.Sdk)
125 lines
4.9 KiB
YAML
125 lines
4.9 KiB
YAML
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
|
|
|
|
# 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: {}
|
|
|
|
# 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
|
|
|
|
# Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing
|
|
publishUsingPipelines: false
|
|
|
|
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
|
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
# Skip component governance and codesign validation for SDL. These jobs
|
|
# create no content.
|
|
- name: skipComponentGovernanceDetection
|
|
value: true
|
|
- name: runCodesignValidationInjection
|
|
value: false
|
|
|
|
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'
|
|
checkDownloadedFiles: true
|
|
condition: ${{ parameters.condition }}
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- task: NuGetAuthenticate@0
|
|
|
|
- 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)
|
|
|
|
- task: PowerShell@2
|
|
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)
|
|
/p:OfficialBuildId=$(Build.BuildNumber)
|
|
condition: ${{ parameters.condition }}
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
- task: powershell@2
|
|
displayName: Create ReleaseConfigs Artifact
|
|
inputs:
|
|
targetType: inline
|
|
script: |
|
|
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)
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish ReleaseConfigs Artifact
|
|
inputs:
|
|
PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt'
|
|
PublishLocation: Container
|
|
ArtifactName: ReleaseConfigs
|
|
|
|
- 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
|
|
|
|
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
|
|
- template: /eng/common/templates/steps/publish-logs.yml
|
|
parameters:
|
|
JobLabel: 'Publish_Artifacts_Logs'
|