Merge "Switch logrotate->build-discarder for all projects"
[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     properties:
26         - opendaylight-infra-properties:
27             build-days-to-keep: 14
28
29     parameters:
30         - opendaylight-infra-parameters:
31             project: '{project}'
32             branch: '{branch}'
33             refspec: 'refs/heads/{branch}'
34             artifacts: '{archive-artifacts}'
35
36     wrappers:
37         - opendaylight-infra-wrappers:
38             build-timeout: '30'
39
40     triggers:
41         - gerrit:
42             server-name: '{server-name}'
43             trigger-on:
44                 - change-merged-event
45                 - comment-added-contains-event:
46                     comment-contains-value: 'remerge'
47             projects:
48               - project-compare-type: 'ANT'
49                 project-pattern: '**'
50                 branches:
51                   - branch-compare-type: 'ANT'
52                     branch-pattern: '**/{branch}'
53                 file-paths:
54                     - compare-type: ANT
55                       pattern: docs/**/*.rst
56
57     builders:
58         - shell: |
59             curl -X POST https://readthedocs.org/build/{rtdproject}
60
61     publishers:
62         - email-notification:
63             email-recipients: '{email-recipients}'
64             email-prefix: '[docs]'
65         - opendaylight-infra-shiplogs:
66             maven-version: 'mvn33'
67
68 - job-template:
69     # FIXME: Describe this job in docs/jenkins.rst
70     name: 'docs-verify-rtd-{stream}'
71     node: centos7-java-builder-2c-8g
72
73     project-type: freestyle
74
75     properties:
76         - opendaylight-infra-properties:
77             build-days-to-keep: 14
78
79     parameters:
80         - opendaylight-infra-parameters:
81             project: '{project}'
82             branch: '{branch}'
83             refspec: 'refs/heads/{branch}'
84             artifacts: '{archive-artifacts}'
85
86     scm:
87         - git-scm-with-submodules:
88             branch: '{branch}'
89
90     wrappers:
91         - opendaylight-infra-wrappers:
92             build-timeout: '{build-timeout}'
93
94     triggers:
95         - gerrit-trigger-patch-submitted:
96             server: '{server-name}'
97             project: '**'
98             branch: '{branch}'
99             files: 'docs/**/*.rst'
100         - timed: 'H H * * *'
101
102     builders:
103         - shell: |
104             if [ "$GERRIT_PROJECT" != "docs" ]; then
105                 cd docs/submodules/$GERRIT_PROJECT
106                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
107             else
108                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
109             fi
110         - shell: |
111             virtualenv $WORKSPACE/venv
112             source $WORKSPACE/venv/bin/activate
113             pip install --upgrade pip
114             pip freeze
115             pip install tox
116             tox -edocs
117
118     publishers:
119         - email-notification:
120             email-recipients: '{email-recipients}'
121             email-prefix: '[docs]'
122         - opendaylight-infra-shiplogs:
123             maven-version: 'mvn33'