Package io.jenkins.plugins.python
Class WithPythonStep
java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
io.jenkins.plugins.python.WithPythonStep
- All Implemented Interfaces:
ExtensionPoint,Describable<org.jenkinsci.plugins.workflow.steps.Step>,Serializable
public class WithPythonStep
extends org.jenkinsci.plugins.workflow.steps.Step
implements Serializable
Pipeline step enabling execution inside a specific Python version environment,
supporting virtual environments, CUDA hardware acceleration, corporate mirrors,
and host system Python runtimes.
Example:
withPython(version: '3.12.15', venv: '.venv', cuda: true) {
sh 'python --version'
}
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHome()getTool()getVenv()booleanisClear()booleanisCuda()booleanisSystem()booleanbooleanisUv()booleanvoidsetClear(boolean clear) voidsetCuda(boolean cuda) voidsetCudaHome(String cudaHome) voidvoidsetMirrorUrl(String mirrorUrl) voidsetSystem(boolean system) voidsetSystemSitePackages(boolean systemSitePackages) voidvoidsetUv(boolean uv) voidsetUvCacheDir(String uvCacheDir) voidsetUvMirrorUrl(String uvMirrorUrl) voidsetUvVersion(String uvVersion) voidvoidsetVersion(String version) org.jenkinsci.plugins.workflow.steps.StepExecutionstart(org.jenkinsci.plugins.workflow.steps.StepContext context) Methods inherited from class org.jenkinsci.plugins.workflow.steps.Step
getDescriptor
-
Constructor Details
-
WithPythonStep
-
-
Method Details
-
getVersion
-
setVersion
-
getTool
-
setTool
-
isSystem
public boolean isSystem() -
setSystem
@DataBoundSetter public void setSystem(boolean system) -
getHome
-
setHome
-
getMirrorUrl
-
setMirrorUrl
-
getVenv
-
setVenv
-
isClear
public boolean isClear() -
setClear
@DataBoundSetter public void setClear(boolean clear) -
isSystemSitePackages
public boolean isSystemSitePackages() -
setSystemSitePackages
@DataBoundSetter public void setSystemSitePackages(boolean systemSitePackages) -
isCuda
public boolean isCuda() -
setCuda
@DataBoundSetter public void setCuda(boolean cuda) -
getCudaHome
-
setCudaHome
-
isUv
public boolean isUv() -
setUv
@DataBoundSetter public void setUv(boolean uv) -
getUvVersion
-
setUvVersion
-
getUvMirrorUrl
-
setUvMirrorUrl
-
getUvCacheDir
-
setUvCacheDir
-
isUvEnabled
public boolean isUvEnabled() -
start
public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context) throws Exception - Specified by:
startin classorg.jenkinsci.plugins.workflow.steps.Step- Throws:
Exception
-