Add docs linting job
[releng/builder.git] / jjb / docs / docs-rtd.yaml
1 ---
2 - project:
3     name: docs-rtd
4     jobs:
5       - 'docs-merge-rtd-{stream}'
6       - 'docs-verify-rtd-{stream}'
7       - '{project-name}-verify-tox-{stream}'
8
9     stream:
10       - carbon:
11           branch: 'master'
12       - boron:
13           branch: 'stable/boron'
14       - beryllium:
15           branch: 'stable/beryllium'
16
17     project: docs
18     project-name: docs
19     rtdproject: opendaylight
20     archive-artifacts: 'docs/_build/html/**'
21
22 - job-template:
23     name: 'docs-merge-rtd-{stream}'
24     node: centos7-java-builder-2c-8g
25
26     project-type: freestyle
27
28     properties:
29       - opendaylight-infra-properties:
30           build-days-to-keep: 14
31
32     parameters:
33       - opendaylight-infra-parameters:
34           project: '{project}'
35           branch: '{branch}'
36           refspec: 'refs/heads/{branch}'
37           artifacts: '{archive-artifacts}'
38
39     wrappers:
40       - opendaylight-infra-wrappers:
41           build-timeout: '30'
42
43     triggers:
44       - gerrit:
45           server-name: '{server-name}'
46           trigger-on:
47             - change-merged-event
48             - comment-added-contains-event:
49                 comment-contains-value: 'remerge'
50           projects:
51             - project-compare-type: 'ANT'
52               project-pattern: '**'
53               branches:
54                 - branch-compare-type: 'ANT'
55                   branch-pattern: '**/{branch}'
56               file-paths:
57                 - compare-type: ANT
58                   pattern: docs/**/*.rst
59
60     builders:
61       - shell: !include-raw: docs-post-rtd.sh
62
63     publishers:
64       - email-notification:
65           email-recipients: '{email-recipients}'
66           email-prefix: '[docs]'
67       - opendaylight-infra-shiplogs:
68           maven-version: 'mvn33'
69
70 - job-template:
71     # FIXME: Describe this job in docs/jenkins.rst
72     name: 'docs-verify-rtd-{stream}'
73     node: centos7-java-builder-2c-8g
74
75     project-type: freestyle
76
77     properties:
78       - opendaylight-infra-properties:
79           build-days-to-keep: 14
80
81     parameters:
82       - opendaylight-infra-parameters:
83           project: '{project}'
84           branch: '{branch}'
85           refspec: 'refs/heads/{branch}'
86           artifacts: '{archive-artifacts}'
87
88     scm:
89       - git-scm-with-submodules:
90           branch: '{branch}'
91
92     wrappers:
93       - opendaylight-infra-wrappers:
94           build-timeout: '{build-timeout}'
95
96     triggers:
97       - gerrit-trigger-patch-submitted:
98           server: '{server-name}'
99           project: '**'
100           branch: '{branch}'
101           files: 'docs/**/*.rst'
102       - timed: 'H H * * *'
103
104     builders:
105       - shell: |
106           if [ "$GERRIT_PROJECT" != "docs" ]; then
107               cd docs/submodules/$GERRIT_PROJECT
108               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
109           else
110               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
111           fi
112       - shell: |
113           virtualenv $WORKSPACE/venv
114           source $WORKSPACE/venv/bin/activate
115           pip install --upgrade pip
116           pip freeze
117           pip install tox
118           tox -edocs
119
120     publishers:
121       - email-notification:
122           email-recipients: '{email-recipients}'
123           email-prefix: '[docs]'
124       - opendaylight-infra-shiplogs:
125           maven-version: 'mvn33'