The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Pyenv Pipeline Plugin

withPythonEnv: Code Block

Wraps a block in a Python virtualenv. Any pysh or pybat steps executed within the block, are executed using the virtualenv specified


withPythonEnv('python3') {
    pysh 'python --version'

The argument supplied to withPythonEnv is the name of the virtualenv to make available to any pysh or pybat steps called within the block.

Initially, withPythonEnv tries to match the string passed to it to a tool name. Currently, this means examining the installed tools for ShiningPanada. If the string matches an installed ShiningPanda Python tool instance, the virtualenv within that block is generated from that ShiningPanda tool.

Otherwise, the text is treated "as-is". You can pass "python" to use the default Python installation of the node that the job runs on, or specify an executable path.

  • pythonInstallation
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?


See existing feedback here.