2019-11-14 23:21:53 +00:00
|
|
|
parameters:
|
|
|
|
StageLabel: ''
|
|
|
|
JobLabel: ''
|
2023-12-03 18:20:06 +00:00
|
|
|
CustomSensitiveDataList: ''
|
|
|
|
# A default - in case value from eng/common/templates/post-build/common-variables.yml is not passed
|
2023-12-21 13:29:14 +00:00
|
|
|
BinlogToolVersion: '1.0.9'
|
2019-11-14 23:21:53 +00:00
|
|
|
|
|
|
|
steps:
|
2020-09-04 15:32:57 +00:00
|
|
|
- task: Powershell@2
|
|
|
|
displayName: Prepare Binlogs to Upload
|
2019-11-14 23:21:53 +00:00
|
|
|
inputs:
|
2020-09-04 15:32:57 +00:00
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
|
|
|
|
Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
|
2019-11-14 23:21:53 +00:00
|
|
|
continueOnError: true
|
2020-09-04 15:32:57 +00:00
|
|
|
condition: always()
|
2023-12-19 21:23:52 +00:00
|
|
|
|
|
|
|
# TODO: Disabled - https://github.com/dotnet/dnceng/issues/1675
|
|
|
|
# - task: PowerShell@2
|
|
|
|
# displayName: Redact Logs
|
|
|
|
# inputs:
|
|
|
|
# filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1
|
|
|
|
# # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml
|
|
|
|
# # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
|
|
|
|
# # If the file exists - sensitive data for redaction will be sourced from it
|
|
|
|
# # (single entry per line, lines starting with '# ' are considered comments and skipped)
|
|
|
|
# arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs'
|
|
|
|
# -BinlogToolVersion ${{parameters.BinlogToolVersion}}
|
|
|
|
# -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
|
|
|
|
# '$(publishing-dnceng-devdiv-code-r-build-re)'
|
|
|
|
# '$(MaestroAccessToken)'
|
|
|
|
# '$(dn-bot-all-orgs-artifact-feeds-rw)'
|
|
|
|
# '$(akams-client-id)'
|
|
|
|
# '$(akams-client-secret)'
|
|
|
|
# '$(microsoft-symbol-server-pat)'
|
|
|
|
# '$(symweb-symbol-server-pat)'
|
|
|
|
# '$(dn-bot-all-orgs-build-rw-code-rw)'
|
|
|
|
# ${{parameters.CustomSensitiveDataList}}
|
|
|
|
# continueOnError: true
|
|
|
|
# condition: always()
|
|
|
|
|
2020-09-04 15:32:57 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Logs
|
2019-11-14 23:21:53 +00:00
|
|
|
inputs:
|
2020-09-04 15:32:57 +00:00
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: PostBuildLogs
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|