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