Handle CG Failures (#37204)
* handle CG failures by cleaning up previous publishing artifacts from the downloaded platform-specific artifacts
This commit is contained in:
Родитель
16aa1e28d2
Коммит
78857ec731
|
@ -88,6 +88,23 @@ steps:
|
|||
workingDirectory: $(Pipeline.Workspace)
|
||||
displayName: Update package properties with namespaces
|
||||
|
||||
# Component governance collates discovered dependencies from a combination of
|
||||
# manifest files, splatted json output from CG detections, setup.py files, and other sources.
|
||||
# At this point in the job, we have downloadeded package artifacts from 3 previous platform-specific build jobs,
|
||||
# so the directory that will be published as packages_extended _already contains_ a collated set of dependencies by
|
||||
# json file. When we attempt to publish the packages_extended artifact, CG re-collates data from the current job, but ALSO
|
||||
# includes all the data from json files left behind by the previous jobs. While this doesn't result in double counting,
|
||||
# we've been running into some nasty timeout issues of the CG running on this job specifically.
|
||||
#
|
||||
# Given that we've ALREADY RUN CG on the previous jobs, we can clean up these artifacts to avoid
|
||||
# incurring an increased CG runtime. What's present within IS accurate.
|
||||
- pwsh: |
|
||||
Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)" -Filter GovCompDisc* | % { Write-Host "Removing $($_.FullName)"; Remove-Item $_ }
|
||||
Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)" -Filter ScanTelemetry* | % { Write-Host "Removing $($_.FullName)"; Remove-Item $_ }
|
||||
Remove-Item -Recurse -Force -Path "$(Build.ArtifactStagingDirectory)/bcde-output"
|
||||
Remove-Item -Recurse -Force -Path "$(Build.ArtifactStagingDirectory)/_manifest"
|
||||
displayName: Clean up Artifact Directory
|
||||
|
||||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
|
||||
parameters:
|
||||
ArtifactPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
|
Загрузка…
Ссылка в новой задаче