60 lines
2.4 KiB
YAML
60 lines
2.4 KiB
YAML
|
parameters:
|
||
|
StageLabel: ''
|
||
|
JobLabel: ''
|
||
|
CustomSensitiveDataList: ''
|
||
|
# A default - in case value from eng/common/core-templates/post-build/common-variables.yml is not passed
|
||
|
BinlogToolVersion: '1.0.11'
|
||
|
is1ESPipeline: false
|
||
|
|
||
|
steps:
|
||
|
- task: Powershell@2
|
||
|
displayName: Prepare Binlogs to Upload
|
||
|
inputs:
|
||
|
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}}/
|
||
|
continueOnError: true
|
||
|
condition: always()
|
||
|
|
||
|
- 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()
|
||
|
|
||
|
- task: CopyFiles@2
|
||
|
displayName: Gather post build logs
|
||
|
inputs:
|
||
|
SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs'
|
||
|
Contents: '**'
|
||
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs'
|
||
|
|
||
|
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
|
||
|
parameters:
|
||
|
is1ESPipeline: ${{ parameters.is1ESPipeline }}
|
||
|
args:
|
||
|
displayName: Publish Logs
|
||
|
pathToPublish: '$(Build.ArtifactStagingDirectory)/PostBuildLogs'
|
||
|
publishLocation: Container
|
||
|
artifactName: PostBuildLogs
|
||
|
continueOnError: true
|
||
|
condition: always()
|