From cf7f213dcd90ae2160a0bf6f0d678652cb75c3b3 Mon Sep 17 00:00:00 2001 From: Liviu Tomoiaga Date: Thu, 5 Feb 2026 16:45:43 +0200 Subject: [PATCH] ci: Cleanup workspace after upload procedure Signed-off-by: Liviu Tomoiaga --- azure-pipelines.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 74fa08644ab7..3b1246c417d7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -152,7 +152,7 @@ stages: # - PRs (non-fork) targeting: main, next_stable, or 202* release branches # - Direct pushes to: main, next_stable, or 202* release branches - job: Push_to_Artifactory - timeoutInMinutes: 90 + timeoutInMinutes: 120 pool: name: Default demands: @@ -186,6 +186,15 @@ stages: ARTIFACTORY_TOKEN: $(ART_TOKEN) name: PushArtifacts displayName: "Push to Artifactory" + - bash: | + cd $(Build.SourcesDirectory)/bin + TIMESTAMP=$(PushArtifacts.TIMESTAMP) + if [ -d "$TIMESTAMP" ]; then + echo "Cleaning up artifact directory: $TIMESTAMP" + rm -rf "$TIMESTAMP" + fi + displayName: "Cleanup artifacts" + condition: always() - job: Publish_to_Cloudsmith timeoutInMinutes: 120 condition: or( @@ -223,6 +232,15 @@ stages: CLOUDSMITH_API_KEY: $(CLOUDSMITH_API_KEY) name: PushArtifacts displayName: "Push to Cloudsmith" + - bash: | + cd $(Build.SourcesDirectory)/bin + TIMESTAMP=$(PushArtifacts.TIMESTAMP) + if [ -d "$TIMESTAMP" ]; then + echo "Cleaning up artifact directory: $TIMESTAMP" + rm -rf "$TIMESTAMP" + fi + displayName: "Cleanup artifacts" + condition: always() - stage: TestHarness dependsOn: PushArtifacts condition: succeeded()