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