Merge "docs: sphinx upgrade and warnings as erros"

This commit is contained in:
Zuul 2018-01-29 16:51:07 +00:00 committed by Gerrit Code Review
commit 92fcbab123
16 changed files with 165 additions and 143 deletions

View File

@ -1,4 +1,4 @@
.. view_list:
.. _view_list:
List View
=========

View File

@ -1,4 +1,4 @@
.. view_pipeline:
.. _view_pipeline:
Pipeline View
=============

View File

@ -56,6 +56,7 @@ class Base(object):
:arg dict job_data: the intermediate representation of job data
loaded from JJB Yaml files without variables interpolation or other
yaml expansions.
:rtype: boolean
"""

View File

@ -3779,10 +3779,12 @@ def docker_build_publish(parse, xml_parent, data):
:arg str repo-name: Name of repository to push to.
:arg str repo-tag: Tag for image. (default '')
:arg dict server: The docker daemon (optional)
* **uri** (str): Define the docker server to use. (optional)
* **credentials-id** (str): ID of credentials to use to connect
(optional)
:arg dict registry: Registry to push to
* **url** (str) repository url to use (optional)
* **credentials-id** (str): ID of credentials to use to connect
(optional)
@ -3922,7 +3924,7 @@ def nexus_artifact_uploader(registry, xml_parent, data):
File Example:
.. literalinclude::
/../../tests/builders/fixtures/nexus-artifact-uploader.yaml
/../../tests/builders/fixtures/nexus_artifact_uploader001.yaml
:language: yaml
"""
nexus_artifact_uploader = XML.SubElement(

View File

@ -309,7 +309,7 @@ def credentials_param(registry, xml_parent, data):
Example::
.. literalinclude:: \
.. literalinclude::
/../../tests/parameters/fixtures/credentials-param001.yaml
:language: yaml
@ -403,6 +403,7 @@ def extended_choice_param(registry, xml_parent, data):
:language: yaml
Full Example:
.. literalinclude:: \
/../../tests/parameters/fixtures/extended-choice-param-full.yaml
:language: yaml

View File

@ -291,12 +291,7 @@ def branch_api(registry, xml_parent, data):
:arg str time-period: The time period within which the maximum number
of builds will be enforced. (default 'Hour')
:valid values:
* **Hour**
* **Day**
* **Week**
* **Month**
* **Year**
:valid values: **Hour**, **Day**, **Week**, **Month**, **Year**
Minimal Example:
@ -306,7 +301,8 @@ def branch_api(registry, xml_parent, data):
Full example:
.. literalinclude:: /../../tests/properties/fixtures/branch-api-full.yaml
.. literalinclude::
/../../tests/properties/fixtures/branch-api-full.yaml
:language: yaml
"""
branch = XML.SubElement(xml_parent, 'jenkins.branch.'

View File

@ -58,7 +58,8 @@ def allure(registry, xml_parent, data):
Minimal Example:
.. literalinclude:: /../../tests/publishers/fixtures/allure-minimal.yaml
.. literalinclude::
/../../tests/publishers/fixtures/allure-minimal.yaml
:language: yaml
Full Example:
@ -273,12 +274,14 @@ def hue_light(registry, xml_parent, data):
Full Example:
.. literalinclude:: /../../tests/publishers/fixtures/hue-light-full.yaml
.. literalinclude::
/../../tests/publishers/fixtures/hue-light-full.yaml
:language: yaml
Minimal Example:
.. literalinclude:: /../../tests/publishers/fixtures/hue-light-minimal.yaml
.. literalinclude::
/../../tests/publishers/fixtures/hue-light-minimal.yaml
:language: yaml
"""
@ -407,12 +410,14 @@ def codecover(registry, xml_parent, data):
Minimal Example:
.. literalinclude:: /../../tests/publishers/fixtures/codecover-minimal.yaml
.. literalinclude::
/../../tests/publishers/fixtures/codecover-minimal.yaml
:language: yaml
Full Example:
.. literalinclude:: /../../tests/publishers/fixtures/codecover-full.yaml
.. literalinclude::
/../../tests/publishers/fixtures/codecover-full.yaml
:language: yaml
"""
@ -447,7 +452,8 @@ def emotional_jenkins(registry, xml_parent, data):
Example:
.. literalinclude:: /../../tests/publishers/fixtures/emotional-jenkins.yaml
.. literalinclude::
/../../tests/publishers/fixtures/emotional-jenkins.yaml
:language: yaml
"""
XML.SubElement(xml_parent,
@ -931,11 +937,11 @@ def jacoco(registry, xml_parent, data):
Requires the Jenkins :jenkins-wiki:`JaCoCo Plugin <JaCoCo+Plugin>`.
:arg str exec-pattern: This is a file name pattern that can be used to
locate the jacoco report files (default '**/**.exec')
locate the jacoco report files (default ``**/**.exec``)
:arg str class-pattern: This is a file name pattern that can be used
to locate class files (default '**/classes')
to locate class files (default ``**/classes``)
:arg str source-pattern: This is a file name pattern that can be used
to locate source files (default '**/src/main/java')
to locate source files (default ``**/src/main/java``)
:arg bool update-build-status: Update the build according to the results
(default false)
:arg str inclusion-pattern: This is a file name pattern that can be used
@ -2178,15 +2184,18 @@ def cppcheck(registry, xml_parent, data):
is also determined by thresholds. If the actual number of issues
is between the provided thresholds, then the build health is
interpolated.
* **unstable** (`str`): Total number unstable threshold (default '')
* **new-unstable** (`str`): New number unstable threshold (default '')
* **failure** (`str`): Total number failure threshold (default '')
* **new-failure** (`str`): New number failure threshold (default '')
* **healthy** (`str`): Healthy threshold (default '')
* **unhealthy** (`str`): Unhealthy threshold (default '')
:arg dict severity:
:severity: Determines which severity of issues should be considered
when evaluating the build status and health, default all true
* **error** (`bool`): Severity error (default true)
* **warning** (`bool`): Severity warning (default true)
* **style** (`bool`): Severity style (default true)
@ -2194,12 +2203,16 @@ def cppcheck(registry, xml_parent, data):
* **information** (`bool`): Severity information (default true)
* **nocategory** (`bool`): Severity nocategory (default true)
* **portability** (`bool`): Severity portability (default true)
:arg dict graph:
:graph: Graph configuration
* **xysize** (`array`): Chart width and height (default [500, 200])
* **num-builds-in-graph** (`int`): Builds number in graph (default 0)
:arg dict display
:display: which errors to display, default only sum
* **sum** (`bool`): Display sum of all issues (default true)
* **error** (`bool`): Display errors (default false)
* **warning** (`bool`): Display warnings (default false)
@ -2216,6 +2229,7 @@ def cppcheck(registry, xml_parent, data):
:language: yaml
Full Example:
.. literalinclude::
/../../tests/publishers/fixtures/cppcheck-full.yaml
:language: yaml
@ -2302,12 +2316,14 @@ def logparser(registry, xml_parent, data):
Minimal Example:
.. literalinclude:: /../../tests/publishers/fixtures/logparser-minimal.yaml
.. literalinclude::
/../../tests/publishers/fixtures/logparser-minimal.yaml
:language: yaml
Full Example:
.. literalinclude:: /../../tests/publishers/fixtures/logparser-full.yaml
.. literalinclude::
/../../tests/publishers/fixtures/logparser-full.yaml
:language: yaml
"""
@ -2648,6 +2664,7 @@ def sonar(registry, xml_parent, data):
:language: yaml
Full Example:
.. literalinclude:: /../../tests/publishers/fixtures/sonar-full.yaml
:language: yaml
"""
@ -2825,7 +2842,8 @@ def join_trigger(registry, xml_parent, data):
Example:
.. literalinclude:: /../../tests/publishers/fixtures/join-trigger001.yaml
.. literalinclude::
/../../tests/publishers/fixtures/join-trigger001.yaml
:language: yaml
"""
jointrigger = XML.SubElement(xml_parent, 'join.JoinTrigger')
@ -2879,7 +2897,8 @@ def jabber(registry, xml_parent, data):
Minimal Example:
.. literalinclude:: /../../tests/publishers/fixtures/jabber-minimal.yaml
.. literalinclude::
/../../tests/publishers/fixtures/jabber-minimal.yaml
:language: yaml
Full Example:

View File

@ -793,8 +793,10 @@ def svn(registry, xml_parent, data):
:arg list repos: list of repositories to checkout (optional)
:arg list additional-credentials: list of additional credentials (optional)
:Additional-Credentials:
* **realm** (`str`) -- realm to use
* **credentials-id** (`str`) -- optional ID of credentials to use
:arg str viewvc-url: URL of the svn web interface (optional)
:Repo:

View File

@ -16,7 +16,7 @@
The view list module handles creating Jenkins List views.
To create a list view specify ``list`` in the ``view-type`` attribute
to the :ref:`View-list` definition.
to the :ref:`view_list` definition.
:View Parameters:
* **name** (`str`): The name of the view.

View File

@ -15,7 +15,7 @@
"""
The view pipeline module handles creating Jenkins Build Pipeline views.
To create a list view specify ``list`` in the ``view-type`` attribute
to the :ref:`View-pipeline` definition.
to the :ref:`view_pipeline` definition.
Requires the Jenkins
:jenkins-wiki:`Build Pipeline Plugin <build+pipeline+plugin>`.

View File

@ -2,6 +2,7 @@
all_files = 1
build-dir = doc/build
source-dir = doc/source
warning-is-error = 1
[metadata]
name = jenkins-job-builder

View File

@ -6,7 +6,7 @@ hacking<0.13,>=0.12.0 # Apache-2.0
coverage>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.3.1,<1.5.0
sphinx>=1.5.0,<1.7.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
testrepository>=0.0.18 # Apache-2.0/BSD

View File

@ -52,7 +52,7 @@ from jenkins_jobs.xml_config import XmlJobGenerator
# This dance deals with the fact that we want unittest.mock if
# we're on Python 3.4 and later, and non-stdlib mock otherwise.
try:
from unittest import mock
from unittest import mock # noqa
except ImportError:
import mock # noqa