TwineAuthenticate@0 - Python 孪生上传身份验证 v0 任务

为生成范围的环境变量提供 twine 凭据 PYPIRC_PATH 。 这使你能够发布 Python 包,以便从生成中使用 馈送 twine

语法

# 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.
# Python Twine Upload Authenticate v0
# Authentication for uploading python distributions using twine. Please add "-r FeedName/EndpointName --config-file $(PYPIRC_PATH)" to your twine upload command. For feeds present in this organization use feed name as 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.

输入

artifactFeeds - 我的源 (选择下面的)
输入别名: feedListstring.

指定要通过孪生进行身份验证的 Azure 项目的源名称。 身份验证源必须存在于组织内。 对于项目范围的源,请使用语法 projectName/feedNameSelect


externalFeeds - 来自外部组织的源
输入别名: externalSourcesstring.

来自外部组织的 孪生服务连接 名称,用于通过 twine 进行身份验证。 存储在终结点中的凭据必须具有包上传权限。


publishPackageMetadata - 发布管道元数据
boolean. 默认值:true

将此生成/发布管道的元数据 ((如运行 # 和源代码信息)) 与上传到源时与包相关联。


任务控件选项

除任务输入外,所有任务都有控制选项。 有关详细信息,请参阅 控制选项和常见任务属性

输出变量

无。

备注

为生成范围的环境变量提供 twine 凭据 PYPIRC_PATH 。 这使你能够发布 Python 包,以便从生成中使用 馈送 twine

应在管道中何时运行此任务?

必须先运行此任务,然后才能使用孪生将 Python 分发版上传到经过身份验证的包源,例如 Azure Artifacts。 没有其他订购要求。 多次调用此任务不会堆叠凭据。 每次任务运行都将清除以前存储的任何凭据。

我的代理位于 Web 代理后面。 TwineAuthenticate 是否会设置 twine 以使用我的代理?

否。 虽然此任务本身将在代理 配置为使用的 Web 代理后面工作,但它不会将孪生体配置为使用代理。

我的管道需要访问其他项目中的源

如果管道在与托管源的项目不同的项目中运行,则必须设置另一个项目以授予对生成服务的读/写访问权限。 有关更多详细信息 ,请参阅 Azure Pipelines 中的包权限

要求

要求 说明
管道类型 YAML,经典内部版本,经典发布
运行平台 Agent、DeploymentGroup
需求
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任意
可设置的变量 任意
代理版本 2.144.0 或更高版本
任务类别 程序包
要求 说明
管道类型 YAML,经典内部版本,经典发布
运行平台 Agent、DeploymentGroup
需求
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任意
可设置的变量 任意
代理版本 2.115.0 或更高版本
任务类别 程序包