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