从Azure Devops向PyPi发布程序包在麻线上传时挂起

问题描述 投票:1回答:1

我想将构建的.whl包从我们的Azure Devops发布管道发布到PyPi.org,但是脚本twine upload保持挂起状态,没有错误,完成或超时。因此,实际无法上传我们的软件包(非常小)。

这是它的设置方式:

Yaml版本:

trigger:
- master
pr: none
pool:
  vmImage: 'ubuntu-latest'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.7'
    addToPath: true
    architecture: 'x64'

- script: python -m pip install --upgrade pip setuptools wheel
  displayName: 'Install tools'

- script: pip install -r src/requirements.txt
  displayName: 'Install requirements'

- script: |    
    python src/setup.py bdist_wheel 
  displayName: 'Artifact creation'

- script: python -m pip install --upgrade twine
  displayName: 'Install Twine'

- task: TwineAuthenticate@1
  inputs:
    pythonUploadServiceConnection: 'AzureML PyPi feed'

- script: |
   python -m twine upload --config-file $(PYPIRC_PATH) dist/*.whl
  displayName: 'Publish to PyPi through Twine'

服务连接:

  • 认证方法由Authentication Token指定。
  • 要上传的Python存储库URL:https://upload.pypi.org/legacy
  • EndpointName:azure-pypi
  • 服务连接名称:AzureML PyPi feed
  • [[X]向所有管道授予访问权限

发布日志(最相关的部分:):>

TwineAuthenticate步骤:

Starting: TwineAuthenticate
==============================================================================
Task         : Python twine upload authenticate
Description  : Authenticate for uploading Python distributions using twine. Add '-r FeedName/EndpointName --config-file $(PYPIRC_PATH)' to your twine upload command. For feeds present in this organization, use the feed name as the repository (-r). Otherwise, use the endpoint name defined in the service connection.
Version      : 1.165.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/twine-authenticate
==============================================================================
75c64e89-xxxxxredactedxxxxx exists true
Adding authentication to configuration for registry azure-pypi
Successfully added auth for 0 internal feed and 1 external endpoint.
Finishing: TwineAuthenticate

发布步骤

Starting: Publish to PyPi through Twine
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.164.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
python -m twine upload --config-file /home/vsts/work/_temp/twineAuthenticate/Wv8nMR/.pypirc dist/*.whl
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /home/vsts/work/_temp/0d772e31-148f-4e3c-999b-b2a43a02b287.sh
Uploading distributions to https://upload.pypi.org/legacy/

这会保持30分钟以上不变,因此我只是在不部署软件包的情况下取消了发行。有任何想法吗?

我想将构建的.whl包从我们的Azure Devops发布管道发布到PyPi.org,但是脚本麻线上传始终挂起,没有错误,完成或超时。因此,我们...

python azure azure-devops pypi twine
1个回答
0
投票

我暂时有一个临时解决方法:

© www.soinside.com 2019 - 2024. All rights reserved.