Skip to content

Commit

Permalink
Improve Nuget-CUDA-Packaging-Pipeline (#19668)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->
* Publish the artifacts as late as possible
* once published the artifacts are immutable, and any retry will fail if
they exist
  * if any step fails after publishing the stage cannot be retried
* use powershell to cleanup
  * DeleteFiles is taking >30 mins and causing the stage to timeout
  * powershell took < 1s

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Make pipeline more robust
  • Loading branch information
skottmckay authored Feb 27, 2024
1 parent 580ee20 commit 1c468a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,6 @@ stages:
PlatformsSupported: 'linux-x64'
VerifyNugetSigning: false

- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline NuGet Artifact'
inputs:
artifactName: 'drop-signed-nuget-GPU'
targetPath: '$(Build.ArtifactStagingDirectory)'


- task: MSBuild@1
displayName: 'Clean C#'
inputs:
Expand All @@ -241,6 +234,12 @@ stages:
parameters:
condition: 'succeeded'

- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline NuGet Artifact'
inputs:
artifactName: 'drop-signed-nuget-GPU'
targetPath: '$(Build.ArtifactStagingDirectory)'

- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ parameters:

steps:
- ${{ if eq(variables['System.TeamProject'], 'Lotus') }}:
- task: DeleteFiles@1
inputs:
SourceFolder: '$(Build.BinariesDirectory)'
contents: |
**/*
- powershell: |
Remove-Item $(Build.BinariesDirectory)/* -Recurse -Force
displayName: 'Clean up build directory'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
Expand Down

0 comments on commit 1c468a0

Please sign in to comment.