Merge "Fix view definition documentation"

This commit is contained in:
Zuul 2018-01-26 15:34:24 +00:00 committed by Gerrit Code Review
commit a0d75f00f9
4 changed files with 31 additions and 12 deletions

View File

@ -518,6 +518,7 @@ The bulk of the job definitions come from the following modules.
:glob:
project_*
view_*
builders
hipchat
metadata

View File

@ -0,0 +1,7 @@
.. view_pipeline:
Pipeline View
=============
.. automodule:: view_pipeline
:members:

View File

@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import xml.etree.ElementTree as XML
import jenkins_jobs.modules.base
from jenkins_jobs.modules.helpers import convert_mapping_to_xml
"""
The view list module handles creating Jenkins List views.
@ -38,8 +33,24 @@ to the :ref:`View-list` definition.
* **recurse** (`bool`): Recurse in subfolders.(default false)
* **status-filter** (`bool`): Filter job list by enabled/disabled
status. (optional)
Example:
.. literalinclude::
/../../tests/views/fixtures/view_list001.yaml
Example:
.. literalinclude::
/../../tests/views/fixtures/view_list002.yaml
"""
import xml.etree.ElementTree as XML
import jenkins_jobs.modules.base
from jenkins_jobs.modules.helpers import convert_mapping_to_xml
COLUMN_DICT = {
'status': 'hudson.views.StatusColumn',
'weather': 'hudson.views.WeatherColumn',

View File

@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import xml.etree.ElementTree as XML
import jenkins_jobs.modules.base
from jenkins_jobs.modules.helpers import convert_mapping_to_xml
"""
The view pipeline module handles creating Jenkins Build Pipeline views.
To create a list view specify ``list`` in the ``view-type`` attribute
@ -57,14 +52,19 @@ Requires the Jenkins
Example:
.. literalinclude::
/../../tests/views/fixtures/pipeline_view001.yaml
/../../tests/views/fixtures/view_pipeline001.yaml
Example:
.. literalinclude::
/../../tests/views/fixtures/pipeline_view002.yaml
/../../tests/views/fixtures/view_pipeline002.yaml
"""
import xml.etree.ElementTree as XML
import jenkins_jobs.modules.base
from jenkins_jobs.modules.helpers import convert_mapping_to_xml
class Pipeline(jenkins_jobs.modules.base.Base):
sequence = 0