Fix view definition documentation

View documentation was not properly being generated and linked
in the index. Let's add that in.

Change-Id: I6197dbecc89ddcf8c6f6b0e6a3d4c517224dc77b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
This commit is contained in:
Thanh Ha 2018-01-17 22:25:14 -05:00
parent 705051658f
commit 06bc48c0fd
No known key found for this signature in database
GPG Key ID: B0CB27E00DA095AA
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