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