zuul-jobs/roles/ensure-twine/README.rst
Ian Wienand e0a2b647a6 test/upload-pypi : install venv
When we added this test I used ensure-pip in the ensure-twine role to
pull in the pip dependency.  But we soon realised that ensure-twine
ran in a rootless context so couldn't install packages, and reverted
it with I2cf4224228860b8a2cddd360636bb8633967b07e.

However, this testing wasn't fixed up.  Use ensure-pip in the test
playbook before we run the test, and add a note to ensure-twine that
it runs without privileges.

Change-Id: I6aef14b188dce8c4de774b09ddad718fec8fbf6c
2022-07-27 10:54:30 +10:00

28 lines
878 B
ReStructuredText

Ensure twine is installed.
This role is designed to run without permissions, so assumes a working
Python 3 ``pip`` environment (i.e. it will not install system
packages).
**Role Variables**
.. zuul:rolevar:: twine_python
:default: python
The python interpreter to use to install twine if it is not already
installed. Set it to "python3" to use python 3, for example.
**Output Variables**
.. zuul:rolevar:: twine_excutable
:default: twine
After running this role, ``twine_executable`` will be set as the path
to a valid ``twine``.
At role runtime, look for an existing ``twine`` at this specific
path. Note the default (``twine``) effectively means to find tox in
the current ``$PATH``. For example, if your base image
pre-installs twine in an out-of-path environment, set this so the
role does not attempt to install the user version.