Refactor common parameters into opendaylight-infra-parameters
[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         - boron:
9             branch: 'master'
10         - beryllium:
11             branch: 'stable/beryllium'
12
13     project: 'docs'
14     rtdproject: 'opendaylight'
15
16 - job-template:
17     name: 'docs-merge-rtd-{stream}'
18     node: dynamic_verify
19
20     project-type: freestyle
21
22     logrotate:
23         daysToKeep: 14
24
25     parameters:
26         - opendaylight-infra-parameters:
27             project: '{project}'
28             branch: '{branch}'
29             refspec: 'refs/heads/{branch}'
30             artifacts: '{archive-artifacts}'
31
32     wrappers:
33         - opendaylight-infra-wrappers:
34             build-timeout: '30'
35
36     triggers:
37         - gerrit:
38             server-name: 'OpenDaylight'
39             trigger-on:
40                 - change-merged-event
41                 - comment-added-contains-event:
42                     comment-contains-value: 'remerge'
43             projects:
44               - project-compare-type: 'ANT'
45                 project-pattern: '**'
46                 branches:
47                   - branch-compare-type: 'ANT'
48                     branch-pattern: '**/{branch}'
49                 file-paths:
50                     - compare-type: ANT
51                       pattern: docs/**
52
53     builders:
54         - shell: |
55             curl -X POST https://readthedocs.org/build/{rtdproject}
56
57     publishers:
58         - email-notification:
59             email-prefix: '[docs]'
60
61 - job-template:
62     name: 'docs-verify-rtd-{stream}'
63     node: dynamic_verify
64
65     project-type: freestyle
66
67     logrotate:
68         daysToKeep: 14
69
70     parameters:
71         - opendaylight-infra-parameters:
72             project: '{project}'
73             branch: '{branch}'
74             refspec: 'refs/heads/{branch}'
75             artifacts: '{archive-artifacts}'
76
77     scm:
78         - git-scm-with-submodules:
79             branch: '{branch}'
80
81     wrappers:
82         - opendaylight-infra-wrappers:
83             build-timeout: '{build-timeout}'
84
85     triggers:
86         - gerrit:
87             server-name: 'OpenDaylight'
88             trigger-on:
89                 - patchset-created-event:
90                     exclude-drafts: 'true'
91                     exclude-trivial-rebase: 'true'
92                     exclude-no-code-change: 'true'
93                 - draft-published-event
94                 - comment-added-contains-event:
95                     comment-contains-value: 'recheck'
96             projects:
97               - project-compare-type: 'ANT'
98                 project-pattern: '**'
99                 branches:
100                   - branch-compare-type: 'ANT'
101                     branch-pattern: '**/{branch}'
102                 file-paths:
103                     - compare-type: ANT
104                       pattern: docs/**
105         - timed: 'H H * * *'
106
107     builders:
108         - shell: |
109             if [ "$GERRIT_PROJECT" != "docs" ]; then
110                 cd docs/submodules/$GERRIT_PROJECT
111                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
112             else
113                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
114             fi
115         - shell: |
116             virtualenv $WORKSPACE/venv
117             source $WORKSPACE/venv/bin/activate
118             pip install --upgrade pip
119             pip freeze
120             pip install tox
121             tox -edocs
122
123     publishers:
124         - email-notification:
125             email-prefix: '[docs]'