Merge "Migrate docs jobs to use lf-infra-publish"
[releng/builder.git] / jjb / docs / docs-rtd.yaml
1 ---
2 - project:
3     name: docs-rtd
4     jobs:
5       - 'docs-merge-rtd-{stream}'
6       - 'docs-verify-rtd-{stream}'
7       - '{project-name}-verify-tox-{stream}'
8
9     stream:
10       - nitrogen:
11           branch: 'master'
12           jre: 'openjdk8'
13       - carbon:
14           branch: 'stable/carbon'
15       - boron:
16           branch: 'stable/boron'
17
18     project: docs
19     project-name: docs
20     rtdproject: opendaylight
21     archive-artifacts: 'docs/_build/html/**'
22
23 - job-template:
24     name: 'docs-merge-rtd-{stream}'
25     node: centos7-java-builder-2c-8g
26
27     project-type: freestyle
28
29     properties:
30       - opendaylight-infra-properties:
31           build-days-to-keep: 14
32
33     parameters:
34       - opendaylight-infra-parameters:
35           os-cloud: '{os-cloud}'
36           project: '{project}'
37           branch: '{branch}'
38           refspec: 'refs/heads/{branch}'
39           artifacts: '{archive-artifacts}'
40
41     wrappers:
42       - opendaylight-infra-wrappers:
43           build-timeout: '30'
44
45     triggers:
46       - gerrit:
47           server-name: '{server-name}'
48           trigger-on:
49             - change-merged-event
50             - comment-added-contains-event:
51                 comment-contains-value: 'remerge'
52           projects:
53             - project-compare-type: 'ANT'
54               project-pattern: '**'
55               branches:
56                 - branch-compare-type: 'ANT'
57                   branch-pattern: '**/{branch}'
58               file-paths:
59                 - compare-type: ANT
60                   pattern: docs/**/*.rst
61
62     builders:
63       - shell: !include-raw: docs-post-rtd.sh
64
65     publishers:
66       - email-notification:
67           email-recipients: '{email-recipients}'
68           email-prefix: '[docs]'
69       - lf-infra-publish
70
71 - job-template:
72     # FIXME: Describe this job in docs/jenkins.rst
73     name: 'docs-verify-rtd-{stream}'
74     node: centos7-java-builder-2c-8g
75     concurrent: true
76
77     project-type: freestyle
78
79     properties:
80       - opendaylight-infra-properties:
81           build-days-to-keep: 14
82
83     parameters:
84       - opendaylight-infra-parameters:
85           os-cloud: '{os-cloud}'
86           project: '{project}'
87           branch: '{branch}'
88           refspec: 'refs/heads/{branch}'
89           artifacts: '{archive-artifacts}'
90
91     scm:
92       - git-scm-with-submodules:
93           branch: '{branch}'
94
95     wrappers:
96       - opendaylight-infra-wrappers:
97           build-timeout: '{build-timeout}'
98
99     triggers:
100       - gerrit-trigger-patch-submitted:
101           server: '{server-name}'
102           project: '**'
103           branch: '{branch}'
104           files: 'docs/**/*.rst'
105       - timed: 'H H * * *'
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           PYTHON="$WORKSPACE/venv/bin/python"
119           $PYTHON -m pip install --upgrade pip
120           $PYTHON -m pip freeze
121           $PYTHON -m pip install tox
122           tox -edocs
123
124     publishers:
125       - email-notification:
126           email-recipients: '{email-recipients}'
127           email-prefix: '[docs]'
128       - lf-infra-publish