d30a98c1f7
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.CMake.Sdk From Version 6.0.0-beta.24163.13 -> To Version 6.0.0-beta.24176.9
123 lines
4.8 KiB
YAML
123 lines
4.8 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
|
|
- 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@1
|
|
|
|
- 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.dot.net
|
|
/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: |
|
|
New-Item -Path "$(Build.StagingDirectory)/ReleaseConfigs" -ItemType Directory -Force
|
|
$filePath = "$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt"
|
|
Add-Content -Path $filePath -Value $(BARBuildId)
|
|
Add-Content -Path $filePath -Value "$(DefaultChannels)"
|
|
Add-Content -Path $filePath -Value $(IsStableBuild)
|
|
|
|
- task: 1ES.PublishBuildArtifacts@1
|
|
displayName: Publish ReleaseConfigs Artifact
|
|
inputs:
|
|
PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs'
|
|
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: 1ES.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-official/steps/publish-logs.yml
|
|
parameters:
|
|
JobLabel: 'Publish_Artifacts_Logs'
|