Merge "Add exception for docs project"
[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
11     project: 'docs'
12     rtdproject: 'opendaylight'
13
14 - job-template:
15     name: 'docs-merge-rtd-{stream}'
16     node: dynamic_verify
17
18     project-type: freestyle
19
20     logrotate:
21         daysToKeep: 14
22
23     parameters:
24         - project-parameter:
25             project: '{project}'
26         - gerrit-parameters:
27             project: '{project}'
28             branch: '{branch}'
29             refspec: 'refs/heads/{branch}'
30
31     wrappers:
32         - ssh-agent-credentials:
33             users:
34                 - '{ssh-credentials}'
35
36     triggers:
37         - gerrit:
38             trigger-on:
39                 - change-merged-event
40                 - comment-added-contains-event:
41                     comment-contains-value: 'remerge'
42             projects:
43               - project-compare-type: 'ANT'
44                 project-pattern: '**'
45                 branches:
46                   - branch-compare-type: 'ANT'
47                     branch-pattern: '**/{branch}'
48                 file-paths:
49                     - compare-type: ANT
50                       pattern: docs/**
51
52     builders:
53         - shell: |
54             curl -X POST https://readthedocs.org/build/{rtdproject}
55
56     publishers:
57         - email-notification:
58             email-prefix: '[docs]'
59
60 - job-template:
61     name: 'docs-verify-rtd-{stream}'
62     node: dynamic_verify
63
64     project-type: freestyle
65
66     logrotate:
67         daysToKeep: 14
68
69     parameters:
70         - project-parameter:
71             project: '{project}'
72         - gerrit-parameters:
73             project: '{project}'
74             branch: '{branch}'
75             refspec: 'refs/heads/{branch}'
76
77     scm:
78         - git-scm-with-submodules:
79             credentials-id: '{ssh-credentials}'
80             branch: '{branch}'
81
82     wrappers:
83         - ssh-agent-credentials:
84             users:
85                 - '{ssh-credentials}'
86
87     triggers:
88         - gerrit:
89             trigger-on:
90                 - patchset-created-event:
91                     exclude-drafts: 'true'
92                     exclude-trivial-rebase: 'true'
93                     exclude-no-code-change: 'true'
94                 - draft-published-event
95                 - comment-added-contains-event:
96                     comment-contains-value: 'recheck'
97             projects:
98               - project-compare-type: 'ANT'
99                 project-pattern: '**'
100                 branches:
101                   - branch-compare-type: 'ANT'
102                     branch-pattern: '**/{branch}'
103                 file-paths:
104                     - compare-type: ANT
105                       pattern: docs/**
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]'