TwineAuthenticate@0 - Python 孪生上传身份验证 v0 任务
为生成范围的 PYPIRC_PATH
环境变量提供 twine
凭据。 这样,便可以使用生成中的 twine
将 Python 包发布到源。
语法
# Python twine upload authenticate v0
# 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.
- task: TwineAuthenticate@0
inputs:
# Feeds and Authentication
#artifactFeeds: # string. Alias: feedList. My feeds (select below).
#externalFeeds: # string. Alias: externalSources. Feeds from external organizations.
# Advanced
#publishPackageMetadata: true # boolean. Publish pipeline metadata. Default: true.
输入
artifactFeeds
-
我的源(选择下方)
输入别名:feedList
。
string
。
指定要使用孪生进行身份验证的 Azure 项目的源名称。 身份验证源必须存在于组织中。 对于项目范围的源,请使用语法 projectName/feedNameSelect
。
publishPackageMetadata
-
发布管道元数据
boolean
。 默认值:true
。
将此生成/发布管道的元数据(如 run # 和源代码信息)与上传到源时将包相关联。
任务控制选项
除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性。
输出变量
没有。
注解
为生成范围的 PYPIRC_PATH
环境变量提供 twine
凭据。 这样,便可以使用生成中的 twine
将 Python 包发布到源。
何时应在管道中运行此任务?
必须先运行此任务,然后才能使用孪生将 Python 分发版上传到经过身份验证的包源,例如 Azure Artifacts。 没有其他订购要求。 此任务的多个调用不会堆叠凭据。 每个任务运行都将清除以前存储的任何凭据。
我的代理位于 Web 代理后面。 TwineAuthenticate 是否会设置孪生体以使用我的代理?
不是。 虽然此任务本身将在 Web 代理后面工作,但代理已配置为使用,但它不会将孪生体配置为使用代理。
我的管道需要访问其他项目中的源
如果管道在与托管源的项目不同的项目中运行,则必须设置其他项目以授予对生成服务的读/写访问权限。 有关详细信息,请参阅 Azure Pipelines 中的 包权限。