From 90bbbbde1d78a06a18136b0ff5300fb82e79ee2b Mon Sep 17 00:00:00 2001 From: Baiju Meswani Date: Wed, 24 Jan 2024 16:54:42 -0800 Subject: [PATCH] Set pythonInterpreter in set-python-manylinux-variables-step.yml (#188) --- .../templates/clean-agent-build-directory-step.yml | 10 ---------- .../templates/set-python-manylinux-variables-step.yml | 1 + .../torch-ort-packaging-pipeline-nightly.yml | 6 ++++-- .../torch-ort-packaging-pipeline-stable.yml | 6 ++++-- 4 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 tools/ci_build/github/azure-pipelines/templates/clean-agent-build-directory-step.yml diff --git a/tools/ci_build/github/azure-pipelines/templates/clean-agent-build-directory-step.yml b/tools/ci_build/github/azure-pipelines/templates/clean-agent-build-directory-step.yml deleted file mode 100644 index 3f49254e..00000000 --- a/tools/ci_build/github/azure-pipelines/templates/clean-agent-build-directory-step.yml +++ /dev/null @@ -1,10 +0,0 @@ -# cleans $(Agent.BuildDirectory) unconditionally on multiple platforms - -steps: -- script: rd /S /Q $(Agent.BuildDirectory) - displayName: Clean build files (Windows) - condition: eq(variables['Agent.OS'], 'Windows_NT') # and always() -- script: sudo rm -rf $(Agent.BuildDirectory) - displayName: Clean build files (POSIX) sudo rm -rf $(Agent.BuildDirectory) - condition: not(eq(variables['Agent.OS'], 'Windows_NT')) # and always() - continueOnError: true # continuing on error for this step, since linux build folder is somehow getting permission issue diff --git a/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml b/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml index 190362ff..e808a191 100644 --- a/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml +++ b/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml @@ -5,6 +5,7 @@ steps: - task: PythonScript@0 displayName: 'Set Python manylinux variables' inputs: + pythonInterpreter: /usr/bin/python3 scriptSource: inline script: | version = "$(PythonVersion)" diff --git a/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-nightly.yml b/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-nightly.yml index a554b83d..f6448613 100644 --- a/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-nightly.yml +++ b/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-nightly.yml @@ -27,6 +27,10 @@ stages: BuildType: 'nightly' steps: + - task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 + displayName: 'Clean Agent Directories' + condition: always() + - checkout: self clean: true submodules: recursive @@ -41,5 +45,3 @@ stages: - template: templates/component-governance-component-detection-steps.yml parameters: condition: 'succeeded' - - - template: templates/clean-agent-build-directory-step.yml diff --git a/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-stable.yml b/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-stable.yml index c9c3bd00..352674ca 100644 --- a/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-stable.yml +++ b/tools/ci_build/github/azure-pipelines/torch-ort-packaging-pipeline-stable.yml @@ -27,6 +27,10 @@ stages: BuildType: 'stable' steps: + - task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 + displayName: 'Clean Agent Directories' + condition: always() + - checkout: self clean: true submodules: recursive @@ -41,5 +45,3 @@ stages: - template: templates/component-governance-component-detection-steps.yml parameters: condition: 'succeeded' - - - template: templates/clean-agent-build-directory-step.yml