Migrate docs-rtd to archive-builds macro
[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         - opendaylight-infra-wrappers:
33             build-timeout: '30'
34
35     triggers:
36         - gerrit:
37             server-name: 'OpenDaylight'
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         - archive-build:
60             maven-version: '{mvn33}'
61
62 - job-template:
63     name: 'docs-verify-rtd-{stream}'
64     node: dynamic_verify
65
66     project-type: freestyle
67
68     logrotate:
69         daysToKeep: 14
70
71     parameters:
72         - project-parameter:
73             project: '{project}'
74         - gerrit-parameters:
75             project: '{project}'
76             branch: '{branch}'
77             refspec: 'refs/heads/{branch}'
78
79     scm:
80         - git-scm-with-submodules:
81             branch: '{branch}'
82
83     wrappers:
84         - opendaylight-infra-wrappers:
85             build-timeout: '{build-timeout}'
86
87     triggers:
88         - gerrit:
89             server-name: 'OpenDaylight'
90             trigger-on:
91                 - patchset-created-event:
92                     exclude-drafts: 'true'
93                     exclude-trivial-rebase: 'true'
94                     exclude-no-code-change: 'true'
95                 - draft-published-event
96                 - comment-added-contains-event:
97                     comment-contains-value: 'recheck'
98             projects:
99               - project-compare-type: 'ANT'
100                 project-pattern: '**'
101                 branches:
102                   - branch-compare-type: 'ANT'
103                     branch-pattern: '**/{branch}'
104                 file-paths:
105                     - compare-type: ANT
106                       pattern: docs/**
107         - timed: 'H H * * *'
108
109     builders:
110         - shell: |
111             if [ "$GERRIT_PROJECT" != "docs" ]; then
112                 cd docs/submodules/$GERRIT_PROJECT
113                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
114             else
115                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
116             fi
117         - shell: |
118             virtualenv $WORKSPACE/venv
119             source $WORKSPACE/venv/bin/activate
120             pip install --upgrade pip
121             pip freeze
122             pip install tox
123             tox -edocs
124
125     publishers:
126         - email-notification:
127             email-prefix: '[docs]'
128         - archive-build:
129             maven-version: '{mvn33}'