pyjen.plugins.pipelinejob module
Primitives that manage Jenkins job of type ‘pipeline’
- class pyjen.plugins.pipelinejob.PipelineJob(api)[source]
Bases:
pyjen.job.Job
Jenkins job of type ‘pipeline’
- Parameters
api (JenkinsAPI) – Pre-initialized connection to the Jenkins REST API
- static get_jenkins_plugin_name()[source]
str: the name of the Jenkins plugin associated with this PyJen plugin
This static method is used by the PyJen plugin API to associate this class with a specific Jenkins plugin, as it is encoded in the config.xml
- scm_definition(scm, script_path='Jenkinsfile', lightweight=True)[source]
Defines the Pipeline groovy script used by this job from files stored in a source code repository
- Parameters
scm (XMLPlugin) – PyJen object defining the source code repository to use
script_path (str) – Path within the repository where the groovy script to be run is found. Defaults to ‘Jenkinsfile’ in the root folder
lightweight (bool) – Set to True to have the build only check out the Jenkinsfile and no other file from the repository. Set to False to have the build check out the entire repository before running the Jenkinsfile.
- class pyjen.plugins.pipelinejob.PipelineXML(api)[source]
Bases:
pyjen.utils.jobxml.JobXML
Object that manages the config.xml for a pipeline job
- Parameters
api (JenkinsAPI) – Rest API for the Jenkins XML configuration managed by this object
- scm_definition(scm, script_path, lightweight)[source]
Defines the Pipeline groovy script used by this job from files stored in a source code repository
- Parameters
scm (XMLPlugin) – PyJen object defining the source code repository to use
script_path (str) – Path within the repository where the groovy script to be run is found.
lightweight (bool) – Set to True to have the build only check out the Jenkinsfile and no other file from the repository. Set to False to have the build check out the entire repository before running the Jenkinsfile.
- pyjen.plugins.pipelinejob.PluginClass