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
YAML
# 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.
YAML
# 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.
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?
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.
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.