From 309885b08de747f6de4beaaf1fbb216554d31262 Mon Sep 17 00:00:00 2001 From: liqunfu Date: Mon, 22 Mar 2021 18:44:54 -0700 Subject: [PATCH] upload ort-gpu-training python nightly package to azure feed (#6998) --- .../templates/py-packaging-stage.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml index f98994be29..3404ac62c1 100644 --- a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml @@ -315,6 +315,34 @@ stages: inputs: ArtifactName: onnxruntime_gpu + - script: | + sudo apt-get update + sudo apt-get install python3-pip python-dev + displayName: 'sudo apt-get install python3-pip python-dev' + + - script: | + python3 -m pip install twine + displayName: 'python3 -m pip install twine' + timeoutInMinutes: 20 + + # this block does not work because TwineAuthenticate@1 will trigger cleanup of $(PYPIRC_PATH) + # at the end of pipeline execution. Because $(PYPIRC_PATH) is already cleaned by clean-agent-build-directory-step.yml + # the cleanup task for TwineAuthenticate@1 will fail. For this reason, we cannot used TwineAuthenticate@1. + # - task: TwineAuthenticate@1 + # inputs: + # artifactFeed: 'lotus/ort-gpu-nightly-training-feed' + + # - script: | + # python3 -m twine upload -r ort-gpu-nightly-training-feed --config-file $(PYPIRC_PATH) $(Build.ArtifactStagingDirectory)/Release/dist/*.whl + # displayName: 'python3 -m twine upload -r ort-gpu-nightly-training-feed $(Build.ArtifactStagingDirectory)/Release/dist/*.whl' + # timeoutInMinutes: 20 + + - script: | + python3 -m twine upload -r ORT-Nightly --repository-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/upload \ + --username $(ortpypitrainingnightlyusername) --password $(aiinfrapypifeedpassword) $(Build.ArtifactStagingDirectory)/Release/dist/*.whl + displayName: 'python3 -m twine upload $(Build.ArtifactStagingDirectory)/Release/dist/*.whl' + timeoutInMinutes: 20 + - template: component-governance-component-detection-steps.yml parameters: condition: 'succeeded'