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