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