From 753b3b46dc24e13ac350c1ed3ffd241ba3a35047 Mon Sep 17 00:00:00 2001 From: Darragh Bailey Date: Tue, 24 Feb 2015 16:15:56 +0000 Subject: [PATCH] Use sphinx extlinks to shorten links to Jenkins wiki Reduce the links to the Jenkins wiki for references to plugin pages by using the sphinx.ext.extlinks module to provide a custom alias for generating links using the same base url. Change-Id: Ifba460cd131b4630deb41356e2b32641efe3086a --- doc/source/conf.py | 6 +- jenkins_jobs/modules/builders.py | 89 ++++----- jenkins_jobs/modules/metadata.py | 4 +- jenkins_jobs/modules/notifications.py | 4 +- jenkins_jobs/modules/parameters.py | 39 ++-- jenkins_jobs/modules/project_flow.py | 3 +- jenkins_jobs/modules/project_matrix.py | 10 +- jenkins_jobs/modules/project_multijob.py | 3 +- jenkins_jobs/modules/properties.py | 48 +++-- jenkins_jobs/modules/publishers.py | 223 ++++++++++------------- jenkins_jobs/modules/scm.py | 28 ++- jenkins_jobs/modules/triggers.py | 30 ++- jenkins_jobs/modules/wrappers.py | 128 ++++++------- 13 files changed, 265 insertions(+), 350 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 6e09b560b..8192ada8d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,7 +27,8 @@ sys.path.insert(0, os.path.abspath('../../jenkins_jobs/modules')) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', - 'jenkins_jobs.sphinx.yaml', 'sphinxcontrib.programoutput'] + 'jenkins_jobs.sphinx.yaml', 'sphinxcontrib.programoutput', + 'sphinx.ext.extlinks'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -249,3 +250,6 @@ texinfo_documents = [ # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' + +extlinks = {'jenkins-wiki': ('https://wiki.jenkins-ci.org/display/JENKINS/%s', + None)} diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py index b597d4822..1ec18b29b 100644 --- a/jenkins_jobs/modules/builders.py +++ b/jenkins_jobs/modules/builders.py @@ -64,8 +64,8 @@ def shell(parser, xml_parent, data): def python(parser, xml_parent, data): """yaml: python - Execute a python command. Requires the Jenkins `Python plugin. - `_ + Execute a python command. Requires the Jenkins :jenkins-wiki:`Python plugin + `. :arg str parameter: the python command to execute @@ -82,9 +82,8 @@ def python(parser, xml_parent, data): def copyartifact(parser, xml_parent, data): """yaml: copyartifact - Copy artifact from another project. Requires the Jenkins `Copy Artifact - plugin. - `_ + Copy artifact from another project. Requires the :jenkins-wiki:`Copy + Artifact plugin `. :arg str project: Project to copy from :arg str filter: what files to copy @@ -188,8 +187,8 @@ def copyartifact(parser, xml_parent, data): def change_assembly_version(parser, xml_parent, data): """yaml: change-assembly-version Change the assembly version. - Requires the Jenkins `Change Assembly Version. - `_ + Requires the Jenkins :jenkins-wiki:`Change Assembly Version + `. :arg str version: Set the new version number for replace (default 1.0.0) :arg str assemblyFile: The file name to search (default AssemblyInfo.cs) @@ -211,8 +210,8 @@ def change_assembly_version(parser, xml_parent, data): def ant(parser, xml_parent, data): """yaml: ant - Execute an ant target. Requires the Jenkins `Ant Plugin. - `_ + Execute an ant target. Requires the Jenkins :jenkins-wiki:`Ant Plugin + `. To setup this builder you can either reference the list of targets or use named parameters. Below is a description of both forms: @@ -279,9 +278,8 @@ def ant(parser, xml_parent, data): def trigger_builds(parser, xml_parent, data): """yaml: trigger-builds Trigger builds of other jobs. - Requires the Jenkins `Parameterized Trigger Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Parameterized Trigger Plugin + `. :arg str project: the Jenkins project to trigger :arg str predefined-parameters: @@ -516,8 +514,8 @@ def trigger_builds(parser, xml_parent, data): def builders_from(parser, xml_parent, data): """yaml: builders-from Use builders from another project. - Requires the Jenkins `Template Project Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Template Project Plugin + `. :arg str projectName: the name of the other project @@ -534,8 +532,8 @@ def builders_from(parser, xml_parent, data): def inject(parser, xml_parent, data): """yaml: inject Inject an environment for the job. - Requires the Jenkins `EnvInject Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`EnvInject Plugin + `. :arg str properties-file: the name of the property file (optional) :arg str properties-content: the properties content (optional) @@ -563,8 +561,8 @@ def artifact_resolver(parser, xml_parent, data): """yaml: artifact-resolver Allows one to resolve artifacts from a maven repository like nexus (without having maven installed) - Requires the Jenkins `Repository Connector Plugin - `_ + Requires the Jenkins :jenkins-wiki:`Repository Connector Plugin + `. :arg bool fail-on-error: Whether to fail the build on error (default false) :arg bool repository-logging: Enable repository logging (default false) @@ -617,8 +615,8 @@ def artifact_resolver(parser, xml_parent, data): def gradle(parser, xml_parent, data): """yaml: gradle - Execute gradle tasks. Requires the Jenkins `Gradle Plugin. - `_ + Execute gradle tasks. Requires the Jenkins :jenkins-wiki:`Gradle Plugin + `. :arg str tasks: List of tasks to execute :arg str gradle-name: Use a custom gradle name (optional) @@ -681,8 +679,7 @@ def _groovy_common_scriptSource(data): def groovy(parser, xml_parent, data): """yaml: groovy Execute a groovy script or command. - Requires the Jenkins `Groovy Plugin - `_ + Requires the Jenkins :jenkins-wiki:`Groovy Plugin `. :arg str file: Groovy file to run. (Alternative: you can chose a command instead) @@ -726,8 +723,7 @@ def groovy(parser, xml_parent, data): def system_groovy(parser, xml_parent, data): """yaml: system-groovy Execute a system groovy script or command. - Requires the Jenkins `Groovy Plugin - `_ + Requires the Jenkins :jenkins-wiki:`Groovy Plugin `. :arg str file: Groovy file to run. (Alternative: you can chose a command instead) @@ -771,8 +767,8 @@ def batch(parser, xml_parent, data): def powershell(parser, xml_parent, data): """yaml: powershell - Execute a powershell command. Requires the `Powershell Plugin - `_. + Execute a powershell command. Requires the :jenkins-wiki:`Powershell Plugin + `. :Parameter: the powershell command to execute @@ -787,8 +783,8 @@ def powershell(parser, xml_parent, data): def msbuild(parser, xml_parent, data): """yaml: msbuild - Build .NET project using msbuild. Requires the `Jenkins MSBuild Plugin - `_. + Build .NET project using msbuild. Requires the :jenkins-wiki:`Jenkins + MSBuild Plugin `. :arg str msbuild-version: which msbuild configured in Jenkins to use (optional) @@ -825,9 +821,9 @@ def create_builders(parser, step): def conditional_step(parser, xml_parent, data): """yaml: conditional-step - Conditionally execute some build steps. Requires the Jenkins `Conditional - BuildStep Plugin `_. + Conditionally execute some build steps. Requires the Jenkins + :jenkins-wiki:`Conditional BuildStep Plugin + `. Depending on the number of declared steps, a `Conditional step (single)` or a `Conditional steps (multiple)` is created in Jenkins. @@ -1081,8 +1077,8 @@ def maven_target(parser, xml_parent, data): def multijob(parser, xml_parent, data): """yaml: multijob - Define a multijob phase. Requires the Jenkins `Multijob Plugin. - `_ + Define a multijob phase. Requires the Jenkins + :jenkins-wiki:`Multijob Plugin `. This builder may only be used in \ :py:class:`jenkins_jobs.modules.project_multijob.MultiJob` projects. @@ -1208,8 +1204,8 @@ def multijob(parser, xml_parent, data): def grails(parser, xml_parent, data): """yaml: grails - Execute a grails build step. Requires the `Jenkins Grails Plugin. - `_ + Execute a grails build step. Requires the :jenkins-wiki:`Jenkins Grails + Plugin `. :arg bool use-wrapper: Use a grails wrapper (default false) :arg str name: Select a grails installation to use (optional) @@ -1274,8 +1270,8 @@ def grails(parser, xml_parent, data): def sbt(parser, xml_parent, data): """yaml: sbt - Execute a sbt build step. Requires the Jenkins `Sbt Plugin. - `_ + Execute a sbt build step. Requires the Jenkins :jenkins-wiki:`Sbt Plugin + `. :arg str name: Select a sbt installation to use. If no name is provided, the first in the list of defined SBT @@ -1313,8 +1309,7 @@ def critical_block_start(parser, xml_parent, data): Must also add a build wrapper (exclusion), specifying the resources that control the critical block. Otherwise, this will have no effect. - Requires Jenkins `Exclusion Plugin. - `_ + Requires Jenkins :jenkins-wiki:`Exclusion Plugin `. Example:: @@ -1342,8 +1337,7 @@ def critical_block_end(parser, xml_parent, data): Must also add a build wrapper (exclusion), specifying the resources that control the critical block. Otherwise, this will have no effect. - Requires Jenkins `Exclusion Plugin. - `_ + Requires Jenkins :jenkins-wiki:`Exclusion Plugin `. Example:: @@ -1388,8 +1382,7 @@ class Builders(jenkins_jobs.modules.base.Base): def shining_panda(parser, xml_parent, data): """yaml: shining-panda Execute a command inside various python environments. Requires the Jenkins - `ShiningPanda plugin - `_. + :jenkins-wiki:`ShiningPanda plugin `. :arg str build-environment: Building environment to set up (Required). @@ -1514,8 +1507,8 @@ def shining_panda(parser, xml_parent, data): def managed_script(parser, xml_parent, data): """yaml: managed-script This step allows to reference and execute a centrally managed - script within your build. Requires the Jenkins `Managed Script Plugin. - `_ + script within your build. Requires the Jenkins + :jenkins-wiki:`Managed Script Plugin `. :arg str script-id: Id of script to execute (Required) :arg str type: Type of managed file (default: script) @@ -1689,8 +1682,7 @@ def dsl(parser, xml_parent, data): """yaml: dsl Process Job DSL - Requires the Jenkins `Job DSL plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Job DSL plugin `. :arg str script-text: dsl script which is Groovy code (Required if target is not specified) @@ -1763,8 +1755,7 @@ def dsl(parser, xml_parent, data): def github_notifier(parser, xml_parent, data): """yaml: github-notifier Set pending build status on Github commit. - Requires the Jenkins `Github Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Github Plugin `. Example: diff --git a/jenkins_jobs/modules/metadata.py b/jenkins_jobs/modules/metadata.py index ee2ae1b7a..404dbdb10 100644 --- a/jenkins_jobs/modules/metadata.py +++ b/jenkins_jobs/modules/metadata.py @@ -16,9 +16,7 @@ """ The Metadata plugin module enables the ability to add metadata to the projects that can be exposed to job environment. -Requires the Jenkins `Metadata Plugin. -`_ +Requires the Jenkins :jenkins-wiki:`Metadata Plugin `. **Component**: metadata :Macro: metadata diff --git a/jenkins_jobs/modules/notifications.py b/jenkins_jobs/modules/notifications.py index d208930bc..cbfc147e8 100644 --- a/jenkins_jobs/modules/notifications.py +++ b/jenkins_jobs/modules/notifications.py @@ -40,8 +40,8 @@ import jenkins_jobs.modules.base def http_endpoint(parser, xml_parent, data): """yaml: http Defines an HTTP notification endpoint. - Requires the Jenkins `Notification Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Notification Plugin + `. :arg str url: URL of the endpoint diff --git a/jenkins_jobs/modules/parameters.py b/jenkins_jobs/modules/parameters.py index 48089e5ca..75b9f5756 100644 --- a/jenkins_jobs/modules/parameters.py +++ b/jenkins_jobs/modules/parameters.py @@ -274,9 +274,8 @@ def run_param(parser, xml_parent, data): def extended_choice_param(parser, xml_parent, data): """yaml: extended-choice Creates an extended choice parameter where values can be read from a file - Requires the Jenkins `Extended Choice Parameter Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Extended Choice Parameter Plugin + `. :arg str name: name of the parameter :arg str description: description of the parameter @@ -351,9 +350,8 @@ def extended_choice_param(parser, xml_parent, data): def validating_string_param(parser, xml_parent, data): """yaml: validating-string A validating string parameter - Requires the Jenkins `Validating String Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Validating String Plugin + `. :arg str name: the name of the parameter :arg str default: the default value of the parameter (optional) @@ -381,9 +379,8 @@ def validating_string_param(parser, xml_parent, data): def svn_tags_param(parser, xml_parent, data): """yaml: svn-tags A svn tag parameter - Requires the Jenkins `Parameterized Trigger Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Parameterized Trigger Plugin + `. :arg str name: the name of the parameter :arg str default: the default value of the parameter (optional) @@ -415,9 +412,8 @@ def svn_tags_param(parser, xml_parent, data): def dynamic_choice_param(parser, xml_parent, data): """yaml: dynamic-choice Dynamic Choice Parameter - Requires the Jenkins `Jenkins Dynamic Parameter Plug-in. - `_ + Requires the Jenkins :jenkins-wiki:`Jenkins Dynamic Parameter Plug-in + `. :arg str name: the name of the parameter :arg str description: a description of the parameter (optional) @@ -444,9 +440,8 @@ def dynamic_choice_param(parser, xml_parent, data): def dynamic_string_param(parser, xml_parent, data): """yaml: dynamic-string Dynamic Parameter - Requires the Jenkins `Jenkins Dynamic Parameter Plug-in. - `_ + Requires the Jenkins :jenkins-wiki:`Jenkins Dynamic Parameter Plug-in + `. :arg str name: the name of the parameter :arg str description: a description of the parameter (optional) @@ -473,9 +468,8 @@ def dynamic_string_param(parser, xml_parent, data): def dynamic_choice_scriptler_param(parser, xml_parent, data): """yaml: dynamic-choice-scriptler Dynamic Choice Parameter (Scriptler) - Requires the Jenkins `Jenkins Dynamic Parameter Plug-in. - `_ + Requires the Jenkins :jenkins-wiki:`Jenkins Dynamic Parameter Plug-in + `. :arg str name: the name of the parameter :arg str description: a description of the parameter (optional) @@ -511,9 +505,8 @@ def dynamic_choice_scriptler_param(parser, xml_parent, data): def dynamic_string_scriptler_param(parser, xml_parent, data): """yaml: dynamic-string-scriptler Dynamic Parameter (Scriptler) - Requires the Jenkins `Jenkins Dynamic Parameter Plug-in. - `_ + Requires the Jenkins :jenkins-wiki:`Jenkins Dynamic Parameter Plug-in + `. :arg str name: the name of the parameter :arg str description: a description of the parameter (optional) @@ -593,8 +586,8 @@ def dynamic_scriptler_param_common(parser, xml_parent, data, ptype): def matrix_combinations_param(parser, xml_parent, data): """yaml: matrix-combinations Matrix combinations parameter - Requires the Jenkins `Matrix Combinations Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Matrix Combinations Plugin + `. :arg str name: the name of the parameter :arg str description: a description of the parameter (optional) diff --git a/jenkins_jobs/modules/project_flow.py b/jenkins_jobs/modules/project_flow.py index 0bd6d4bf1..6df824400 100644 --- a/jenkins_jobs/modules/project_flow.py +++ b/jenkins_jobs/modules/project_flow.py @@ -19,8 +19,7 @@ The flow Project module handles creating Jenkins flow projects. You may specify ``flow`` in the ``project-type`` attribute of the :ref:`Job` definition. -Requires the Jenkins `Build Flow Plugin. -`_ +Requires the Jenkins :jenkins-wiki:`Build Flow Plugin `. In order to use it for job-template you have to escape the curly braces by doubling them in the DSL: { -> {{ , otherwise it will be interpreted by the diff --git a/jenkins_jobs/modules/project_matrix.py b/jenkins_jobs/modules/project_matrix.py index 20a7f46b9..1f9c2cfce 100644 --- a/jenkins_jobs/modules/project_matrix.py +++ b/jenkins_jobs/modules/project_matrix.py @@ -25,15 +25,14 @@ internal YAML structure: * slave name or label (``slave``) * JDK name (``jdk``) -Requires the Jenkins `Matrix Project Plugin. -`_ +Requires the Jenkins :jenkins-wiki:`Matrix Project Plugin +`. The module supports also dynamic axis: * dynamic (``dynamic``) -Requires the Jenkins `dynamic axis Plugin. -`_ +Requires the Jenkins :jenkins-wiki:`dynamic axis Plugin `. To tie the parent job to a specific node, you should use ``node`` parameter. On a matrix project, this will tie *only* the parent job. To restrict axes @@ -60,8 +59,7 @@ Example: .. literalinclude:: /../../tests/general/fixtures/matrix-axis003.yaml -Requires the Jenkins `ShiningPanda Plugin. -`_ +Requires the Jenkins :jenkins-wiki:`ShiningPanda Plugin `. Example:: diff --git a/jenkins_jobs/modules/project_multijob.py b/jenkins_jobs/modules/project_multijob.py index ed1f6c783..74ebc6d6a 100644 --- a/jenkins_jobs/modules/project_multijob.py +++ b/jenkins_jobs/modules/project_multijob.py @@ -21,8 +21,7 @@ the :ref:`Job` definition. This project type may use :py:func:`jenkins_jobs.modules.builders.multijob` \ builders. -Requires the Jenkins `Multijob Plugin. -`_ +Requires the Jenkins :jenkins-wiki:`Multijob Plugin `. Example:: diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py index b94f66ff1..8f68c5eef 100644 --- a/jenkins_jobs/modules/properties.py +++ b/jenkins_jobs/modules/properties.py @@ -41,8 +41,8 @@ import logging def builds_chain_fingerprinter(parser, xml_parent, data): """yaml: builds-chain-fingerprinter Builds chain fingerprinter. - Requires the Jenkins `Builds chain fingerprinter Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Builds chain fingerprinter Plugin + `. :arg bool per-builds-chain: enable builds hierarchy fingerprinting (default False) @@ -66,8 +66,7 @@ def builds_chain_fingerprinter(parser, xml_parent, data): def ownership(parser, xml_parent, data): """yaml: ownership Plugin provides explicit ownership for jobs and slave nodes. - Requires the Jenkins `Ownership Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Ownership Plugin `. :arg bool enabled: whether ownership enabled (default : true) :arg str owner: the owner of job @@ -103,8 +102,8 @@ def promoted_build(parser, xml_parent, data): name must be created via the web interface in the job in order for the job promotion to persist. Promotion processes themselves cannot be configured by jenkins-jobs due to the separate storage of plugin configuration files. - Requires the Jenkins `Promoted Builds Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Promoted Builds Plugin + `. :arg list names: the promoted build names @@ -147,8 +146,7 @@ def github(parser, xml_parent, data): def least_load(parser, xml_parent, data): """yaml: least-load Enables the Least Load Plugin. - Requires the Jenkins `Least Load Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Least Load Plugin `. :arg bool disabled: whether or not leastload is disabled (default True) @@ -167,9 +165,8 @@ def least_load(parser, xml_parent, data): def throttle(parser, xml_parent, data): """yaml: throttle Throttles the number of builds for this job. - Requires the Jenkins `Throttle Concurrent Builds Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Throttle Concurrent Builds Plugin + `. :arg int max-per-node: max concurrent builds per node (default 0) :arg int max-total: max concurrent builds (default 0) @@ -213,8 +210,7 @@ def throttle(parser, xml_parent, data): def inject(parser, xml_parent, data): """yaml: inject Allows you to inject environment variables into the build. - Requires the Jenkins `Env Inject Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Env Inject Plugin `. :arg str properties-file: file to read with properties (optional) :arg str properties-content: key=value properties (optional) @@ -364,8 +360,8 @@ def priority_sorter(parser, xml_parent, data): """yaml: priority-sorter Allows simple ordering of builds, using a configurable job priority. - Requires the Jenkins `Priority Sorter Plugin - `_. + Requires the Jenkins :jenkins-wiki:`Priority Sorter Plugin + `. :arg int priority: Priority of the job. Higher value means higher priority, with 100 as the standard priority. (required) @@ -389,8 +385,8 @@ def build_blocker(parser, xml_parent, data): if at least one name of currently running jobs is matching with one of the given regular expressions. - Requires the Jenkins `Build Blocker Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Build Blocker Plugin + `. :arg bool use-build-blocker: Enable or disable build blocker (optional) (default true) @@ -427,8 +423,8 @@ def copyartifact(parser, xml_parent, data): Specify a list of projects that have access to copy the artifacts of this project. - Requires the Jenkins `Copy Artifact plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin + `. :arg string projects: comma separated list of projects that can copy artifacts of this project. Wild card character '*' is available. @@ -463,8 +459,7 @@ def batch_tasks(parser, xml_parent, data): Batch tasks and builds "lock" the workspace, so when one of those activities is in progress, all the others will block in the queue. - Requires the Jenkins `Batch Task Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Batch Task Plugin `. :arg list batch-tasks: Batch tasks. @@ -491,8 +486,7 @@ def heavy_job(parser, xml_parent, data): This plugin allows you to define "weight" on each job, and making each job consume that many executors - Requires the Jenkins `Heavy Job Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Heavy Job Plugin `. :arg int weight: Specify the total number of executors that this job should occupy (default 1) @@ -515,8 +509,8 @@ def slave_utilization(parser, xml_parent, data): This plugin allows you to specify the percentage of a slave's capacity a job wants to use. - Requires the Jenkins `Slave Utilization Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Slave Utilization Plugin + `. :arg int slave-percentage: Specify the percentage of a slave's execution slots that this job should occupy (default: 0) @@ -542,8 +536,8 @@ def slave_utilization(parser, xml_parent, data): def delivery_pipeline(parser, xml_parent, data): """yaml: delivery-pipeline - Requires the Jenkins `Delivery Pipeline Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Delivery Pipeline Plugin + `. :arg str stage: Name of the stage for this job (default: '') :arg str task: Name of the task for this job (default: '') diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index cdb7dc023..78ea8e5f2 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py @@ -84,9 +84,8 @@ def archive(parser, xml_parent, data): def blame_upstream(parser, xml_parent, data): """yaml: blame-upstream Notify upstream commiters when build fails - Requires the Jenkins `Blame upstream commiters Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Blame upstream commiters Plugin + `. Example: @@ -102,8 +101,7 @@ def blame_upstream(parser, xml_parent, data): def campfire(parser, xml_parent, data): """yaml: campfire Send build notifications to Campfire rooms. - Requires the Jenkins `Campfire Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Campfire Plugin `. Campfire notifications global default values must be configured for the Jenkins instance. Default values will be used if no specific @@ -147,8 +145,8 @@ def campfire(parser, xml_parent, data): def emotional_jenkins(parser, xml_parent, data): """yaml: emotional-jenkins Emotional Jenkins. - Requires the Jenkins `Emotional Jenkins Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Emotional Jenkins Plugin + `. Example: @@ -162,16 +160,14 @@ def emotional_jenkins(parser, xml_parent, data): def trigger_parameterized_builds(parser, xml_parent, data): """yaml: trigger-parameterized-builds Trigger parameterized builds of other jobs. - Requires the Jenkins `Parameterized Trigger Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Parameterized Trigger Plugin + `. Use of the `node-label-name` or `node-label` parameters - requires the Jenkins `NodeLabel Parameter Plugin. + requires the Jenkins :jenkins-wiki:`NodeLabel Parameter Plugin + `. Note: 'node-parameters' overrides the Node that the triggered project is tied to. - `_ :arg str project: name of the job to trigger :arg str predefined-parameters: parameters to pass to the other @@ -319,8 +315,8 @@ def clone_workspace(parser, xml_parent, data): """yaml: clone-workspace Archive the workspace from builds of one project and reuse them as the SCM source for another project. - Requires the Jenkins `Clone Workspace SCM Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Clone Workspace SCM Plugin + `. :arg str workspace-glob: Files to include in cloned workspace :arg str workspace-exclude-glob: Files to exclude from cloned workspace @@ -389,8 +385,7 @@ def clone_workspace(parser, xml_parent, data): def cloverphp(parser, xml_parent, data): """yaml: cloverphp Capture code coverage reports from PHPUnit - Requires the Jenkins `Clover PHP Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Clover PHP Plugin `. Your job definition should pass to PHPUnit the --coverage-clover option pointing to a file in the workspace (ex: clover-coverage.xml). The filename @@ -496,8 +491,8 @@ def coverage(parser, xml_parent, data): """yaml: coverage WARNING: The coverage function is deprecated. Instead, use the cobertura function to generate a cobertura coverage report. - Requires the Jenkins `Cobertura Coverage Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Cobertura Coverage Plugin + `. Example:: @@ -565,8 +560,8 @@ def coverage(parser, xml_parent, data): def cobertura(parser, xml_parent, data): """yaml: cobertura Generate a cobertura coverage report. - Requires the Jenkins `Cobertura Coverage Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Cobertura Coverage Plugin + `. :arg str report-file: This is a file name pattern that can be used to locate the cobertura xml report files (optional) @@ -677,8 +672,7 @@ def cobertura(parser, xml_parent, data): def jacoco(parser, xml_parent, data): """yaml: jacoco Generate a JaCoCo coverage report. - Requires the Jenkins `JaCoCo Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`JaCoCo Plugin `. :arg str exec-pattern: This is a file name pattern that can be used to locate the jacoco report files (default @@ -760,8 +754,8 @@ def jacoco(parser, xml_parent, data): def ftp(parser, xml_parent, data): """yaml: ftp Upload files via FTP. - Requires the Jenkins `Publish over FTP Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Publish over FTP Plugin + `. :arg str site: name of the ftp site :arg str target: destination directory @@ -808,11 +802,10 @@ def junit(parser, xml_parent, data): results (default true). :arg bool test-stability: Add historical information about test results stability (default false). - Requires the Jenkins `Test stability Plugin - `_. + Requires the Jenkins :jenkins-wiki:`Test stability Plugin + `. :arg bool claim-build: Allow claiming of failed tests (default false) - Requires the Jenkins `Claim Plugin. - `_. + Requires the Jenkins :jenkins-wiki:`Claim Plugin `. Minimal example using defaults: @@ -840,8 +833,8 @@ def junit(parser, xml_parent, data): def xunit(parser, xml_parent, data): """yaml: xunit - Publish tests results. Requires the Jenkins `xUnit Plugin. - `_ + Publish tests results. Requires the Jenkins :jenkins-wiki:`xUnit Plugin + `. :arg str thresholdmode: whether thresholds represents an absolute \ number of tests or a percentage. Either 'number' or 'percent', will \ @@ -1001,8 +994,7 @@ def _violations_add_entry(xml_parent, name, data): def violations(parser, xml_parent, data): """yaml: violations Publish code style violations. - Requires the Jenkins `Violations Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Violations Plugin `. The violations component accepts any number of dictionaries keyed by the name of the violations system. The dictionary has the @@ -1069,8 +1061,7 @@ def violations(parser, xml_parent, data): def checkstyle(parser, xml_parent, data): """yaml: checkstyle Publish trend reports with Checkstyle. - Requires the Jenkins `Checkstyle Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Checkstyle Plugin `. The checkstyle component accepts a dictionary with the following values: @@ -1167,8 +1158,7 @@ def checkstyle(parser, xml_parent, data): def scp(parser, xml_parent, data): """yaml: scp Upload files via SCP - Requires the Jenkins `SCP Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`SCP Plugin `. :arg str site: name of the scp site :arg str target: destination directory @@ -1211,8 +1201,8 @@ def scp(parser, xml_parent, data): def ssh(parser, xml_parent, data): """yaml: ssh Upload files via SCP. - Requires the Jenkins `Publish over SSH Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Publish over SSH Plugin + `. :arg str site: name of the ssh site :arg str target: destination directory @@ -1257,8 +1247,8 @@ def ssh(parser, xml_parent, data): def pipeline(parser, xml_parent, data): """yaml: pipeline Specify a downstream project in a pipeline. - Requires the Jenkins `Build Pipeline Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Build Pipeline Plugin + `. :arg str project: the name of the downstream project :arg str predefined-parameters: parameters to pass to the other @@ -1335,8 +1325,7 @@ def email(parser, xml_parent, data): def claim_build(parser, xml_parent, data): """yaml: claim-build Claim build failures - Requires the Jenkins `Claim Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Claim Plugin `. Example:: @@ -1374,8 +1363,8 @@ def base_email_ext(parser, xml_parent, data, ttype): def email_ext(parser, xml_parent, data): """yaml: email-ext Extend Jenkin's built in email notification - Requires the Jenkins `Email-ext Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Email-ext Plugin + `. :arg str recipients: Comma separated list of emails :arg str reply-to: Comma separated list of emails that should be in @@ -1549,8 +1538,7 @@ def aggregate_tests(parser, xml_parent, data): def cppcheck(parser, xml_parent, data): """yaml: cppcheck Cppcheck result publisher - Requires the Jenkins `Cppcheck Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Cppcheck Plugin `. :arg str pattern: file pattern for cppcheck xml report @@ -1634,8 +1622,7 @@ def cppcheck(parser, xml_parent, data): def logparser(parser, xml_parent, data): """yaml: logparser - Requires the Jenkins `Log Parser Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Log Parser Plugin `. :arg str parse-rules: full path to parse rules :arg bool unstable-on-warning: mark build unstable on warning @@ -1663,8 +1650,8 @@ def logparser(parser, xml_parent, data): def copy_to_master(parser, xml_parent, data): """yaml: copy-to-master Copy files to master from slave - Requires the Jenkins `Copy To Slave Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Copy To Slave Plugin + `. :arg list includes: list of file patterns to copy :arg list excludes: list of file patterns to exclude @@ -1698,8 +1685,7 @@ def copy_to_master(parser, xml_parent, data): def jira(parser, xml_parent, data): """yaml: jira Update relevant JIRA issues - Requires the Jenkins `JIRA Plugin - `_ + Requires the Jenkins :jenkins-wiki:`JIRA Plugin `. Example:: @@ -1712,8 +1698,8 @@ def jira(parser, xml_parent, data): def groovy_postbuild(parser, xml_parent, data): """yaml: groovy-postbuild Execute a groovy script. - Requires the Jenkins `Groovy Postbuild Plugin - `_ + Requires the Jenkins :jenkins-wiki:`Groovy Postbuild Plugin + `. :Parameter: the groovy script to execute @@ -1777,8 +1763,8 @@ def base_publish_over(xml_parent, data, console_prefix, def cifs(parser, xml_parent, data): """yaml: cifs Upload files via CIFS. - Requires the Jenkins `Publish over CIFS Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Publish over CIFS Plugin + `. :arg str site: name of the cifs site/share :arg str target: destination directory @@ -1819,9 +1805,8 @@ def cigame(parser, xml_parent, data): """yaml: cigame This plugin introduces a game where users get points for improving the builds. - Requires the Jenkins `The Continuous Integration Game plugin. - `_ + Requires the Jenkins :jenkins-wiki:`The Continuous Integration Game plugin + `. Example: @@ -1888,8 +1873,8 @@ def sonar(parser, xml_parent, data): def performance(parser, xml_parent, data): """yaml: performance Publish performance test results from jmeter and junit. - Requires the Jenkins `Performance Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Performance Plugin + `. :arg int failed-threshold: Specify the error percentage threshold that set the build failed. A negative value means @@ -1994,8 +1979,7 @@ def join_trigger(parser, xml_parent, data): def jabber(parser, xml_parent, data): """yaml: jabber Integrates Jenkins with the Jabber/XMPP instant messaging protocol - Requires the Jenkins `Jabber Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Jabber Plugin `. :arg bool notify-on-build-start: Whether to send notifications to channels when a build starts (default false) @@ -2089,8 +2073,8 @@ def jabber(parser, xml_parent, data): def workspace_cleanup(parser, xml_parent, data): """yaml: workspace-cleanup (post-build) - Requires the Jenkins `Workspace Cleanup Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Workspace Cleanup Plugin + `. The pre-build workspace-cleanup is available as a wrapper. @@ -2197,8 +2181,8 @@ def text_finder(parser, xml_parent, data): This plugin lets you search keywords in the files you specified and additionally check build status - Requires the Jenkins `Text-finder Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Text-finder Plugin + `. :arg str regexp: Specify a regular expression :arg str fileset: Specify the path to search @@ -2238,8 +2222,8 @@ def html_publisher(parser, xml_parent, data): """yaml: html-publisher This plugin publishes HTML reports. - Requires the Jenkins `HTML Publisher Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`HTML Publisher Plugin + `. :arg str name: Report name :arg str dir: HTML directory to archive @@ -2277,8 +2261,8 @@ def rich_text_publisher(parser, xml_parent, data): This plugin puts custom rich text message to the Build pages and Job main page. - Requires the Jenkins `Rich Text Publisher Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Rich Text Publisher Plugin + `. :arg str stable-text: The stable text :arg str unstable-text: The unstable text if different from stable @@ -2318,8 +2302,7 @@ def tap(parser, xml_parent, data): """yaml: tap Adds support to TAP test result files - Requires the Jenkins `TAP Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`TAP Plugin `. :arg str results: TAP test result files :arg bool fail-if-no-results: Fail if no result (default False) @@ -2366,8 +2349,8 @@ def post_tasks(parser, xml_parent, data): """yaml: post-tasks Adds support to post build task plugin - Requires the Jenkins `Post Build Task plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Post Build Task plugin + `. :arg dict task: Post build task definition :arg list task[matches]: list of matches when to run the task @@ -2431,8 +2414,8 @@ def postbuildscript(parser, xml_parent, data): Executes additional builders, script or Groovy after the build is complete. - Requires the Jenkins `Post Build Script plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Post Build Script plugin + `. :arg list generic-script: Paths to Batch/Shell scripts :arg list groovy-script: Paths to Groovy scripts @@ -2554,8 +2537,8 @@ def xml_summary(parser, xml_parent, data): """yaml: xml-summary Adds support for the Summary Display Plugin - Requires the Jenkins `Summary Display Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Summary Display Plugin + `. :arg str files: Files to parse (default '') @@ -2576,8 +2559,8 @@ def robot(parser, xml_parent, data): """yaml: robot Adds support for the Robot Framework Plugin - Requires the Jenkins `Robot Framework Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Robot Framework Plugin + `. :arg str output-path: Path to directory containing robot xml and html files relative to build workspace. (default '') @@ -2637,8 +2620,8 @@ def robot(parser, xml_parent, data): def warnings(parser, xml_parent, data): """yaml: warnings Generate trend report for compiler warnings in the console log or - in log files. Requires the Jenkins `Warnings Plugin. - `_ + in log files. Requires the Jenkins :jenkins-wiki:`Warnings Plugin + `. :arg list console-log-parsers: The parser to use to scan the console log (default '') @@ -2848,8 +2831,7 @@ def sloccount(parser, xml_parent, data): """yaml: sloccount Generates the trend report for SLOCCount - Requires the Jenkins `SLOCCount Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`SLOCCount Plugin `. :arg str report-files: Setting that specifies the generated raw SLOCCount report files. @@ -2881,8 +2863,7 @@ def ircbot(parser, xml_parent, data): ircbot enables Jenkins to send build notifications via IRC and lets you interact with Jenkins via an IRC bot. - Requires the Jenkins `IRC Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`IRC Plugin `. :arg string strategy: When to send notifications @@ -2997,8 +2978,7 @@ def plot(parser, xml_parent, data): """yaml: plot Plot provides generic plotting (or graphing). - Requires the Jenkins `Plot Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Plot Plugin `. :arg str title: title for the graph (default: '') @@ -3162,8 +3142,7 @@ def git(parser, xml_parent, data): push merge results, tags, and/or branches to remote repositories after the job completes. - Requires the Jenkins `Git Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Git Plugin `. :arg bool push-merge: push merges back to the origin specified in the pre-build merge options (Default: False) @@ -3287,8 +3266,7 @@ def git(parser, xml_parent, data): def github_notifier(parser, xml_parent, data): """yaml: github-notifier Set build status on Github commit. - Requires the Jenkins `Github Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Github Plugin `. Example: @@ -3303,8 +3281,8 @@ def build_publisher(parser, xml_parent, data): This plugin allows records from one Jenkins to be published on another Jenkins. - Requires the Jenkins `Build Publisher Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Build Publisher Plugin + `. :arg str servers: Specify the servers where to publish @@ -3349,8 +3327,8 @@ def stash(parser, xml_parent, data): This plugin will configure the Jenkins Stash Notifier plugin to notify Atlassian Stash after job completes. - Requires the Jenkins `StashNotifier Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`StashNotifier Plugin + `. :arg string url: Base url of Stash Server (Default: "") :arg string username: Username of Stash Server (Default: "") @@ -3383,8 +3361,8 @@ def description_setter(parser, xml_parent, data): This plugin sets the description for each build, based upon a RegEx test of the build log file. - Requires the Jenkins `Description Setter Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Description Setter Plugin + `. :arg str regexp: A RegEx which is used to scan the build log file :arg str regexp-for-failed: A RegEx which is used for failed builds @@ -3423,8 +3401,7 @@ def doxygen(parser, xml_parent, data): This plugin parses the Doxygen descriptor (Doxyfile) and provides a link to the generated Doxygen documentation. - Requires the Jenkins `Doxygen Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Doxygen Plugin `. :arg str doxyfile: The doxyfile path :arg bool keepall: Retain doxygen generation for each successful build @@ -3449,8 +3426,7 @@ def sitemonitor(parser, xml_parent, data): """yaml: sitemonitor This plugin checks the availability of an url. - It requires the `sitemonitor plugin. - `_ + It requires the :jenkins-wiki:`sitemonitor plugin `. :arg list sites: List of URLs to check @@ -3473,8 +3449,7 @@ def testng(parser, xml_parent, data): """yaml: testng This plugin publishes TestNG test reports. - Requires the Jenkins `TestNG Results Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`TestNG Results Plugin `. :arg str pattern: filename pattern to locate the TestNG XML report files :arg bool escape-test-description: escapes the description string @@ -3503,8 +3478,8 @@ def artifact_deployer(parser, xml_parent, data): """yaml: artifact-deployer This plugin makes it possible to copy artifacts to remote locations. - Requires the Jenkins `ArtifactDeployer Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`ArtifactDeployer Plugin + `. :arg list entries: :entries: @@ -3569,8 +3544,7 @@ def s3(parser, xml_parent, data): """yaml: s3 Upload build artifacts to Amazon S3. - Requires the Jenkins `S3 plugin. - `_ + Requires the Jenkins :jenkins-wiki:`S3 plugin `. :arg str s3-profile: Globally-defined S3 profile to use :arg list entries: @@ -3643,8 +3617,8 @@ def ruby_metrics(parser, xml_parent, data): Rcov plugin parses rcov html report files and shows it in Jenkins with a trend graph. - Requires the Jenkins `Ruby metrics plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Ruby metrics plugin + `. :arg str report-dir: Relative path to the coverage report directory :arg dict targets: @@ -3690,8 +3664,7 @@ def fitnesse(parser, xml_parent, data): """yaml: fitnesse Publish Fitnesse test results - Requires the Jenkins `Fitnesse plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Fitnesse plugin `. :arg str results: path specifier for results files @@ -3711,8 +3684,7 @@ def valgrind(parser, xml_parent, data): """yaml: valgrind This plugin publishes Valgrind Memcheck XML results. - Requires the Jenkins `Valgrind Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Valgrind Plugin `. :arg str pattern: Filename pattern to locate the Valgrind XML report files (required) @@ -3842,8 +3814,7 @@ def build_trends_publisher(plugin_name, xml_element, data): def pmd(parser, xml_parent, data): """yaml: pmd Publish trend reports with PMD. - Requires the Jenkins `PMD Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`PMD Plugin `. The PMD component accepts a dictionary with the following values: @@ -3913,8 +3884,8 @@ def scan_build(parser, xml_parent, data): The scan-build report has to be generated in the directory ``${WORKSPACE}/clangScanBuildReports`` for the publisher to find it. - Requires the Jenkins `Clang Scan-Build Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Clang Scan-Build Plugin + `. :arg bool mark-unstable: Mark build as unstable if the number of bugs exceeds a threshold (default: false) @@ -3942,8 +3913,7 @@ def scan_build(parser, xml_parent, data): def dry(parser, xml_parent, data): """yaml: dry Publish trend reports with DRY. - Requires the Jenkins `DRY Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`DRY Plugin `. The DRY component accepts a dictionary with the following values: @@ -4023,8 +3993,8 @@ def dry(parser, xml_parent, data): def shining_panda(parser, xml_parent, data): """yaml: shining-panda - Publish coverage.py results. Requires the Jenkins `ShiningPanda Plugin. - `_. + Publish coverage.py results. Requires the Jenkins + :jenkins-wiki:`ShiningPanda Plugin `. :arg str html-reports-directory: path to coverage.py html results (optional) @@ -4050,9 +4020,8 @@ def create_publishers(parser, action): def conditional_publisher(parser, xml_parent, data): """yaml: conditional-publisher - Conditionally execute some post-build steps. Requires the Jenkins - `Flexible Publish Plugin `_. + Conditionally execute some post-build steps. Requires the Jenkins + :jenkins-wiki:`Flexible Publish Plugin `. A Flexible Publish list of Conditional Actions is created in Jenkins. diff --git a/jenkins_jobs/modules/scm.py b/jenkins_jobs/modules/scm.py index a1f56ec83..0274bf3b1 100644 --- a/jenkins_jobs/modules/scm.py +++ b/jenkins_jobs/modules/scm.py @@ -23,9 +23,8 @@ which accepts any number of scm definitions. :Entry Point: jenkins_jobs.scm The scm module allows referencing multiple repositories in a Jenkins job. -Note: Adding more than one scm definition requires the Jenkins `Multiple -SCMs plugin. -`_ +Note: Adding more than one scm definition requires the Jenkins +:jenkins-wiki:`Multiple SCMs plugin `. Example of multiple repositories in a single job: .. literalinclude:: /../../tests/macros/scm/multi-scms001.yaml @@ -40,8 +39,7 @@ from jenkins_jobs.errors import JenkinsJobsException def git(parser, xml_parent, data): """yaml: git Specifies the git SCM repository for this job. - Requires the Jenkins `Git Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Git Plugin `. :arg str url: URL of the git repository :arg str credentials-id: ID of credential to use to connect, which is the @@ -364,8 +362,7 @@ remoteName/\*') def repo(parser, xml_parent, data): """yaml: repo Specifies the repo SCM repository for this job. - Requires the Jenkins `Repo Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Repo Plugin `. :arg str manifest-url: URL of the repo manifest :arg str manifest-branch: The branch of the manifest to use (optional) @@ -430,9 +427,8 @@ def repo(parser, xml_parent, data): def store(parser, xml_parent, data): """yaml: store Specifies the Visualworks Smalltalk Store repository for this job. - Requires the Jenkins `Visualworks Smalltalk Store Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Visualworks Smalltalk Store Plugin + `. :arg str script: name of the Store script to run :arg str repository: name of the Store repository @@ -601,9 +597,8 @@ def svn(parser, xml_parent, data): def tfs(parser, xml_parent, data): """yaml: tfs Specifies the Team Foundation Server repository for this job. - Requires the Jenkins `Team Foundation Server Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Team Foundation Server Plugin + `. **NOTE**: TFS Password must be entered manually on the project if a user name is specified. The password will be overwritten with an empty @@ -725,8 +720,8 @@ def tfs(parser, xml_parent, data): def workspace(parser, xml_parent, data): """yaml: workspace Specifies the cloned workspace for this job to use as a SCM source. - Requires the Jenkins `Clone Workspace SCM Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Clone Workspace SCM Plugin + `. The job the workspace is cloned from must be configured with an clone-workspace publisher @@ -763,8 +758,7 @@ def workspace(parser, xml_parent, data): def hg(self, xml_parent, data): """yaml: hg Specifies the mercurial SCM repository for this job. - Requires the Jenkins `Mercurial Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Mercurial Plugin `. :arg str url: URL of the hg repository :arg str credentials-id: ID of credentials to use to connect (optional) diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py index 2b65f6e3f..d2c5c2eec 100644 --- a/jenkins_jobs/modules/triggers.py +++ b/jenkins_jobs/modules/triggers.py @@ -201,8 +201,8 @@ def gerrit(parser, xml_parent, data): """yaml: gerrit Trigger on a Gerrit event. - Requires the Jenkins `Gerrit Trigger Plugin - `_ version >= 2.6.0. + Requires the Jenkins :jenkins-wiki:`Gerrit Trigger Plugin ` + version >= 2.6.0. :arg list trigger-on: Events to react on. Please use either the new **trigger-on**, or the old **trigger-on-*** events definitions. You @@ -371,7 +371,7 @@ def gerrit(parser, xml_parent, data): :arg str custom-url: Custom URL for a message sent to Gerrit. Build details URL will be used if empty. (default '') :arg str server-name: Name of the server to trigger on, or ''__ANY__'' to - trigger on any configured Gerrit server (default '__ANY__'). Requires + trigger on any configured Gerrit server (default '__ANY__'). Requires Gerrit Trigger Plugin version >= 2.11.0 You may select one or more Gerrit events upon which to trigger. @@ -534,8 +534,7 @@ def build_pollurl_content_type(xml_parent, entries, prefix, def pollurl(parser, xml_parent, data): """yaml: pollurl Trigger when the HTTP response from a URL changes. - Requires the Jenkins `URLTrigger Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`URLTrigger Plugin `. :arg string cron: cron syntax of when to run (default '') :arg string polling-node: Restrict where the polling should run. @@ -653,8 +652,7 @@ def timed(parser, xml_parent, data): def github(parser, xml_parent, data): """yaml: github Trigger a job when github repository is pushed to. - Requires the Jenkins `GitHub Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`GitHub Plugin `. Example:: @@ -669,9 +667,8 @@ def github(parser, xml_parent, data): def github_pull_request(parser, xml_parent, data): """yaml: github-pull-request Build pull requests in github and report results. - Requires the Jenkins `GitHub Pull Request Builder Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`GitHub Pull Request Builder Plugin + `. :arg list admin-list: the users with admin rights (optional) :arg list white-list: users whose pull requests build (optional) @@ -733,9 +730,8 @@ def github_pull_request(parser, xml_parent, data): def gitlab_merge_request(parser, xml_parent, data): """yaml: gitlab-merge-request Build merge requests in gitlab and report results. - Requires the Jenkins `Gitlab MergeRequest Builder Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Gitlab MergeRequest Builder Plugin. + `. :arg string cron: cron syntax of when to run (required) :arg string project-path: gitlab-relative path to project (required) @@ -767,8 +763,8 @@ def build_result(parser, xml_parent, data): """yaml: build-result Configure jobB to monitor jobA build result. A build is scheduled if there is a new build result that matches your criteria (unstable, failure, ...). - Requires the Jenkins `BuildResultTrigger Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`BuildResultTrigger Plugin + `. :arg list groups: List groups of jobs and results to monitor for :arg list jobs: The jobs to monitor (required) @@ -879,8 +875,8 @@ def reverse(parser, xml_parent, data): def script(parser, xml_parent, data): """yaml: script Triggers the job using shell or batch script. - Requires the Jenkins `ScriptTrigger Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`ScriptTrigger Plugin + `. :arg str label: Restrict where the polling should run. (default '') :arg str script: A shell or batch script. (default '') diff --git a/jenkins_jobs/modules/wrappers.py b/jenkins_jobs/modules/wrappers.py index 61cf0af96..1546965e1 100644 --- a/jenkins_jobs/modules/wrappers.py +++ b/jenkins_jobs/modules/wrappers.py @@ -34,8 +34,7 @@ def ci_skip(parser, xml_parent, data): Skip making a build for certain push. Just add [ci skip] into your commit's message to let Jenkins know, that you do not want to perform build for the next push. - Requires the Jenkins `Ci Skip Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Ci Skip Plugin `. Example: @@ -62,8 +61,8 @@ def config_file_provider(parser, xml_parent, data): """yaml: config-file-provider Provide configuration files (i.e., settings.xml for maven etc.) which will be copied to the job's workspace. - Requires the Jenkins `Config File Provider Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Config File Provider Plugin + `. :arg list files: List of managed config files made up of three\ parameters @@ -103,8 +102,8 @@ def config_file_provider(parser, xml_parent, data): def logfilesize(parser, xml_parent, data): """yaml: logfilesize Abort the build if its logfile becomes too big. - Requires the Jenkins `Logfilesizechecker Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Logfilesizechecker Plugin + `. :arg bool set-own: Use job specific maximum log size instead of global config value (default false). @@ -138,8 +137,8 @@ def logfilesize(parser, xml_parent, data): def timeout(parser, xml_parent, data): """yaml: timeout Abort the build if it runs too long. - Requires the Jenkins `Build Timeout Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Build Timeout Plugin + `. :arg bool fail: Mark the build as failed (default false) :arg bool write-description: Write a message in the description @@ -191,8 +190,7 @@ def timeout(parser, xml_parent, data): def timestamps(parser, xml_parent, data): """yaml: timestamps Add timestamps to the console log. - Requires the Jenkins `Timestamper Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Timestamper Plugin `. Example:: @@ -206,8 +204,7 @@ def timestamps(parser, xml_parent, data): def ansicolor(parser, xml_parent, data): """yaml: ansicolor Translate ANSI color codes to HTML in the console log. - Requires the Jenkins `Ansi Color Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Ansi Color Plugin `. :arg string colormap: (optional) color mapping to use @@ -234,8 +231,8 @@ def ansicolor(parser, xml_parent, data): def mask_passwords(parser, xml_parent, data): """yaml: mask-passwords Hide passwords in the console log. - Requires the Jenkins `Mask Passwords Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Mask Passwords Plugin + `. Example:: @@ -250,8 +247,8 @@ def mask_passwords(parser, xml_parent, data): def workspace_cleanup(parser, xml_parent, data): """yaml: workspace-cleanup (pre-build) - Requires the Jenkins `Workspace Cleanup Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Workspace Cleanup Plugin + `. The post-build workspace-cleanup is available as a publisher. @@ -290,9 +287,8 @@ def workspace_cleanup(parser, xml_parent, data): def m2_repository_cleanup(parser, xml_parent, data): """yaml: m2-repository-cleanup Configure M2 Repository Cleanup - Requires the Jenkins `M2 Repository Cleanup. - `_ + Requires the Jenkins :jenkins-wiki:`M2 Repository Cleanup + `. :arg list patterns: List of patterns for artifacts to cleanup before building. (optional) @@ -319,8 +315,7 @@ Plugin>`_ def rvm_env(parser, xml_parent, data): """yaml: rvm-env Set the RVM implementation - Requires the Jenkins `Rvm Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Rvm Plugin `. :arg str implementation: Type of implementation. Syntax is RUBY[@GEMSET], such as '1.9.3' or 'jruby@foo'. @@ -359,8 +354,7 @@ def rvm_env(parser, xml_parent, data): def rbenv(parser, xml_parent, data): """yaml: rbenv Set the rbenv implementation. - Requires the Jenkins `rbenv plugin. - `_ + Requires the Jenkins :jenkins-wiki:`rbenv plugin `. All parameters are optional. @@ -445,8 +439,8 @@ def rbenv(parser, xml_parent, data): def build_name(parser, xml_parent, data): """yaml: build-name Set the name of the build - Requires the Jenkins `Build Name Setter Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Build Name Setter Plugin + `. :arg str name: Name for the build. Typically you would use a variable from Jenkins in the name. The syntax would be ${FOO} for @@ -467,8 +461,8 @@ def build_name(parser, xml_parent, data): def port_allocator(parser, xml_parent, data): """yaml: port-allocator Assign unique TCP port numbers - Requires the Jenkins `Port Allocator Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Port Allocator Plugin + `. :arg str name: Deprecated, use names instead :arg list names: Variable list of names of the port or list of @@ -498,8 +492,8 @@ def port_allocator(parser, xml_parent, data): def locks(parser, xml_parent, data): """yaml: locks Control parallel execution of jobs. - Requires the Jenkins `Locks and Latches Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Locks and Latches Plugin + `. :arg: list of locks to use @@ -523,8 +517,8 @@ def locks(parser, xml_parent, data): def copy_to_slave(parser, xml_parent, data): """yaml: copy-to-slave Copy files to slave before build - Requires the Jenkins `Copy To Slave Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Copy To Slave Plugin + `. :arg list includes: list of file patterns to copy :arg list excludes: list of file patterns to exclude @@ -567,8 +561,7 @@ def copy_to_slave(parser, xml_parent, data): def inject(parser, xml_parent, data): """yaml: inject Add or override environment variables to the whole build process - Requires the Jenkins `EnvInject Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`EnvInject Plugin `. :arg str properties-file: path to the properties file (default '') :arg str properties-content: key value pair of properties (default '') @@ -600,9 +593,8 @@ def inject(parser, xml_parent, data): def inject_ownership_variables(parser, xml_parent, data): """yaml: inject-ownership-variables Inject ownership variables to the build as environment variables. - Requires the Jenkins `EnvInject Plugin and Jenkins Ownership plugin - - `_ + Requires the Jenkins :jenkins-wiki:`EnvInject Plugin ` + and Jenkins :jenkins-wiki:`Ownership plugin `. :arg bool job-variables: inject job ownership variables to the job (default false) @@ -625,8 +617,7 @@ def inject_ownership_variables(parser, xml_parent, data): def inject_passwords(parser, xml_parent, data): """yaml: inject-passwords Inject passwords to the build as environment variables. - Requires the Jenkins `EnvInject Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`EnvInject Plugin `. :arg bool global: inject global passwords to the job :arg bool mask-password-params: mask passsword parameters @@ -657,8 +648,8 @@ def inject_passwords(parser, xml_parent, data): def env_file(parser, xml_parent, data): """yaml: env-file Add or override environment variables to the whole build process - Requires the Jenkins `Environment File Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Environment File Plugin + `. :arg str properties-file: path to the properties file (default '') @@ -677,8 +668,8 @@ def env_file(parser, xml_parent, data): def env_script(parser, xml_parent, data): """yaml: env-script Add or override environment variables to the whole build process. - Requires the Jenkins `Environment Script Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Environment Script Plugin + `. :arg script-content: The script to run (default: '') :arg only-run-on-parent: Only applicable for Matrix Jobs. If true, run only @@ -699,8 +690,7 @@ def jclouds(parser, xml_parent, data): """yaml: jclouds Uses JClouds to provide slave launching on most of the currently usable Cloud infrastructures. - Requires the Jenkins `JClouds Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`JClouds Plugin `. :arg bool single-use: Whether or not to terminate the slave after use (default: False). @@ -753,8 +743,8 @@ def jclouds(parser, xml_parent, data): def build_user_vars(parser, xml_parent, data): """yaml: build-user-vars Set environment variables to the value of the user that started the build. - Requires the Jenkins `Build User Vars Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Build User Vars Plugin + `. Example:: @@ -767,8 +757,7 @@ def build_user_vars(parser, xml_parent, data): def release(parser, xml_parent, data): """yaml: release Add release build configuration - Requires the Jenkins `Release Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Release Plugin `. :arg bool keep-forever: Keep build forever (default true) :arg bool override-build-parameters: Enable build-parameter override @@ -821,9 +810,8 @@ def sauce_ondemand(parser, xml_parent, data): """yaml: sauce-ondemand Allows you to integrate Sauce OnDemand with Jenkins. You can automate the setup and tear down of Sauce Connect and integrate - the Sauce OnDemand results videos per test. Requires the Jenkins `Sauce - OnDemand Plugin - `_. + the Sauce OnDemand results videos per test. Requires the Jenkins + :jenkins-wiki:`Sauce OnDemand Plugin `. :arg bool enable-sauce-connect: launches a SSH tunnel from their cloud to your private network (default false) @@ -927,8 +915,7 @@ def pathignore(parser, xml_parent, data): This plugin allows SCM-triggered jobs to ignore build requests if only certain paths have changed. - Requires the Jenkins `Pathignore Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Pathignore Plugin `. :arg str ignored: A set of patterns to define ignored changes @@ -962,8 +949,7 @@ def pathignore(parser, xml_parent, data): def pre_scm_buildstep(parser, xml_parent, data): """yaml: pre-scm-buildstep Execute a Build Step before running the SCM - Requires the Jenkins `pre-scm-buildstep. - `_ + Requires the Jenkins :jenkins-wiki:`pre-scm-buildstep `. :arg list buildsteps: List of build steps to execute @@ -997,8 +983,7 @@ def pre_scm_buildstep(parser, xml_parent, data): def logstash(parser, xml_parent, data): """yaml: logstash build wrapper Dump the Jenkins console output to Logstash - Requires the Jenkins `logstash plugin. - `_ + Requires the Jenkins :jenkins-wiki:`logstash plugin `. :arg use-redis: Boolean to use Redis. (default: true) :arg redis: Redis config params @@ -1057,8 +1042,7 @@ def logstash(parser, xml_parent, data): def mongo_db(parser, xml_parent, data): """yaml: mongo-db build wrapper Initalizes a MongoDB database while running the build. - Requires the Jenkins `MongoDB plugin. - `_ + Requires the Jenkins :jenkins-wiki:`MongoDB plugin `. :arg str name: The name of the MongoDB install to use :arg str data-directory: Data directory for the server (optional) @@ -1095,8 +1079,8 @@ def delivery_pipeline(parser, xml_parent, data): The version will be set to the environment variable PIPELINE_VERSION and will also be set in the downstream jobs. - Requires the Jenkins `Delivery Pipeline Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Delivery Pipeline Plugin + `. :arg str version-template: Template for generated version e.g 1.0.${BUILD_NUMBER} (default: '') @@ -1120,8 +1104,8 @@ def delivery_pipeline(parser, xml_parent, data): def matrix_tie_parent(parser, xml_parent, data): """yaml: matrix-tie-parent Tie parent to a node. - Requires the Jenkins `Matrix Tie Parent Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Matrix Tie Parent Plugin + `. Note that from Jenkins version 1.532 this plugin's functionality is available under the "advanced" option of the matrix project configuration. You can use the top level ``node`` parameter to control where the parent @@ -1143,8 +1127,7 @@ def exclusion(parser, xml_parent, data): another job specifies the same resource, the second job will wait for the blocked resource to become available. - Requires the Jenkins `Exclusion Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Exclusion Plugin `. :arg list resources: List of resources to add for exclusion @@ -1169,8 +1152,7 @@ def ssh_agent_credentials(parser, xml_parent, data): """yaml: ssh-agent-credentials Sets up the user for the ssh agent plugin for jenkins. - Requires the Jenkins `SSH-Agent Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`SSH-Agent Plugin `. :arg str user: The user id of the jenkins user credentials (required) @@ -1196,9 +1178,8 @@ def credentials_binding(parser, xml_parent, data): Binds credentials to environment variables using the credentials binding plugin for jenkins. - Requires the Jenkins `Credentials Binding Plugin - `_ - version 1.1 or greater. + Requires the Jenkins :jenkins-wiki:`Credentials Binding Plugin + ` version 1.1 or greater. :arg list binding-type: List of each bindings to create. Bindings may be\ of type `zip-file`, `file`, `username-password`,\ @@ -1248,8 +1229,8 @@ def credentials_binding(parser, xml_parent, data): def custom_tools(parser, xml_parent, data): """yaml: custom-tools - Requires the Jenkins Custom Tools Plugin. - `_ + Requires the Jenkins :jenkins-wiki:`Custom Tools Plugin + `. :arg list tools: List of custom tools to add (optional) @@ -1287,8 +1268,7 @@ def custom_tools(parser, xml_parent, data): def xvnc(parser, xml_parent, data): """yaml: xvnc Enable xvnc during the build. - Requires the Jenkins `xvnc plugin. - `_ + Requires the Jenkins :jenkins-wiki:`xvnc plugin `. :arg bool screenshot: Take screenshot upon build completion (default: false)