TwineAuthenticate@0 - Python twine upload authenticate v0 task

Provides twine credentials to a PYPIRC_PATH environment variable for the scope of the build. This enables you to publish Python packages to feeds with twine from your build.

Syntax

# 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.

Inputs

artifactFeeds - My feeds (select below)
Input alias: feedList. string.

Specifies the Azure artifact's feed name to authenticate with twine. The authenticating feed must be present within the organization. For project-scoped feeds, use the syntax projectName/feedNameSelect.


externalFeeds - Feeds from external organizations
Input alias: externalSources. string.

A twine service connection name from an external organization to authenticate with twine. The credentials stored in the endpoint must have package upload permissions.


publishPackageMetadata - Publish pipeline metadata
boolean. Default value: true.

Associates this build/release pipeline's metadata (such as run # and source code information) with the package when uploading to feeds.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Provides twine credentials to a PYPIRC_PATH environment variable for the scope of the build. This enables you to publish Python packages to feeds with twine from your build.

When in my pipeline should I run this task?

This task must run before you use twine to upload Python distributions to an authenticated package source, such as Azure Artifacts. There are no other ordering requirements. Multiple invocations of this task will not stack credentials. Every task run will erase any previously stored credentials.

My agent is behind a web proxy. Will TwineAuthenticate set up twine to use my proxy?

No. While this task itself will work behind a web proxy your agent has been configured to use, it does not configure twine to use the proxy.

My Pipeline needs to access a feed in a different project

If the pipeline is running in a different project than the project hosting the feed, you must set up the other project to grant read/write access to the build service. See Package permissions in Azure Pipelines for more details.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.144.0 or greater
Task category Package
Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.115.0 or greater
Task category Package