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