无法在私有 DevOps Artifacts 中发布 python 轮

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

我正在设置一个新的 CD 管道,其目标是更新 DevOps Artifacts Feed 上的 Python 库。

这里是我使用的管道:

trigger:
- main

pool:
  vmImage: ubuntu-latest

- task: DownloadPipelineArtifact@2
  inputs:
    buildType: 'specific'
    project: '12ba6212-0768-4c3d-b0d3-836b0423d9a4'
    definition: '3055'
    buildVersionToDownload: 'specific'
    pipelineId: '141443'
    artifactName: 'dev_package'
    itemPattern: '*.whl'
    targetPath: '$(Pipeline.Workspace)/build'

- script: |
    echo '$(Pipeline.Workspace)'
    ls '$(Pipeline.Workspace)/build'

- script: pip install twine
  displayName: 'Install twine'
  
- task: TwineAuthenticate@1
  inputs:
    artifactFeed: 'ABC/FOTA_Utilities'

- script: |
    python -m twine upload -r FOTA_Utilities --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/build/*.whl --verbose
  displayName: 'Upload to feed'

为了加速管道测试,我存储了轮文件以作为管道工件上传。

这里是步骤 TwineAuthenticate@1 的执行日志 enter image description here

这里是麻线上传日志:


python -m twine upload -r FOTA_Utilities --config-file /home/vsts/work/_temp/twineAuthenticate/DM3CO8/.pypirc /home/vsts/work/1/build/*.whl --verbose
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/192f1878-a08d-43c1-ba3d-dd3fd66aee68.sh
INFO     Using configuration from                                               
         /home/vsts/work/_temp/twineAuthenticate/DM3CO8/.pypirc                 
Uploading distributions to 
https://pkgs.dev.azure.com/ORG_NAME/PRJ_NAME/_packaging/FOTA_Utilities/pypi/upload
INFO     /home/vsts/work/1/build/flash-0.1.0-py3-none-any.whl (37.5   
         KB)                                                                    
INFO     username set from config file                                          
INFO     password set from config file                                          
INFO     username: build                                                        
INFO     password: <hidden>                                                     
Uploading dataset_reflash-0.1.0-py3-none-any.whl
25l
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/43.9 kB • --:-- • ?
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.9/43.9 kB • 00:00 • 108.0 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.9/43.9 kB • 00:00 • 108.0 MB/s
25hINFO     Response from                                                          
         https://pkgs.dev.azure.com/ORG_NAME/PRJ_NAME/_packaging/FOTA_Utilities/pypi/
         upload:                                                                
         400 Bad Request - The email 'Salvatore Musumeci [xxxx]' is      
         invalid. (DevOps Activity ID: 6BCEB4BD-CEED-4399-9280-AC4B876B604C)    
INFO     {"$id":"1","innerException":null,"message":"The email 'Salvatore       
         Musumeci [xxx]' is                                             
         invalid.","typeName":"Microsoft.VisualStudio.Services.Packaging.Shared.
         WebApi.Exceptions.InvalidPackageException,                             
         Microsoft.VisualStudio.Services.Packaging.Shared.WebApi","typeKey":"Inv
         alidPackageException","errorCode":0,"eventId":3000}                    
ERROR    HTTPError: 400 Bad Request from                                        
         https://pkgs.dev.azure.com/ORG_NAME/PRJ_NAME/_packaging/FOTA_Utilities/pypi/
         upload                                                                 
         Bad Request - The email 'Salvatore Musumeci [xxx]' is invalid. 
         (DevOps Activity ID: 6BCEB4BD-CEED-4399-9280-AC4B876B604C)             

##[error]Bash exited with code '1'.
Finishing: Upload to feed

最后报告一下feed的权限: enter image description here

有人可以帮助我了解问题出在哪里吗?

提前致谢。

azure-devops azure-pipelines azure-devops-artifacts
1个回答
0
投票

我只是报告解决了该问题的Kevin的评论:

您可以检查一下您是否在中设置了作者电子邮件或维护者电子邮件 pyproject.toml 还是 setup.py?您可以尝试删除电子邮件并运行 再次检查管道是否可以工作。或者您可以尝试上传 本地计算机上的文件并检查它是否可以工作。

实际上问题是 pyproject.toml 中的作者没有报告该电子邮件。我一修好,出版就顺利了

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