Merge "Build base docker image for MSB"
[ci-management.git] / jjb / doc / doc-templates-rtd.yaml
1 ---
2 - job-template:
3     # Job template for verifying Sphinx/Restructured Text for RTD
4     #
5     # The purpose of this job template is verify documentation source
6     #
7     # Required Variables:
8     #     branch:        git branch
9     # Optional Variables:
10     #     path:      directory containing the project's tox.ini relative to
11     #                the workspace. The default is the project root.
12     #     pattern:   ant file-path pattern relative to the workspace used to
13     #                trigger the job
14
15     name: '{project-name}-{stream}-verify-rtd'
16     path: '$WORKSPACE'
17
18     project-type: freestyle
19     concurrent: true
20     node: '{build-node}'
21
22     properties:
23       - infra-properties:
24           build-days-to-keep: '{build-days-to-keep}'
25
26     parameters:
27       - infra-parameters:
28           project: '{project}'
29           branch: '{branch}'
30           refspec: 'refs/heads/{branch}'
31           artifacts: '{archive-artifacts}'
32       - maven-exec:
33           maven-version: '{maven-version}'
34
35     scm:
36       - gerrit-trigger-scm:
37           refspec: '$GERRIT_REFSPEC'
38           choosing-strategy: 'gerrit'
39           submodule-recursive: '{submodule-recursive}'
40
41     wrappers:
42       - infra-wrappers:
43           build-timeout: '{build-timeout}'
44
45     triggers:
46       - gerrit-trigger-patch-submitted:
47           server: '{server-name}'
48           project: '**'
49           branch: '{branch}'
50           files: 'docs/**/*.rst'
51       - timed: 'H H * * *'
52
53     builders:
54       - shell: |
55           if [ "$GERRIT_PROJECT" != "doc" ]; then
56               cd docs/submodules/$GERRIT_PROJECT
57               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
58           else
59               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
60           fi
61       - shell: |
62           #!/bin/bash
63           virtualenv $WORKSPACE/venv-tox
64           source $WORKSPACE/venv-tox/bin/activate
65           pip install --upgrade pip
66           pip install --upgrade tox argparse
67           pip freeze
68           cd $WORKSPACE/{path}
69           tox
70
71     publishers:
72       - infra-shiplogs:
73           maven-version: '{maven-version}'
74
75 - job-template:
76     # Job template for merging/publishing Sphinx/Restructured Text at RTD
77     #
78     # The purpose of this job template is to trigger updates after
79     # a merge of documentation source in gerrit
80     #
81     # Required Variables:
82     #     branch:        git branch
83     #     rtdproject:    name of a project at readthedocs.io
84     # Optional Variables:
85     #     path:      directory containing the project's tox.ini relative to
86     #                the workspace. The default is the project root.
87     #     pattern:   ant file-path pattern relative to the workspace used to
88     #                trigger the job
89
90     name: '{project-name}-{stream}-merge-rtd'
91     path: '$WORKSPACE'
92
93     project-type: freestyle
94     concurrent: false
95     node: '{build-node}'
96
97     properties:
98       - infra-properties:
99           build-days-to-keep: '{build-days-to-keep}'
100
101     parameters:
102       - infra-parameters:
103           project: '{project}'
104           branch: '{branch}'
105           refspec: 'refs/heads/{branch}'
106           artifacts: '{archive-artifacts}'
107       - maven-exec:
108           maven-version: '{maven-version}'
109
110     scm:
111       - gerrit-trigger-scm:
112           refspec: '$GERRIT_REFSPEC'
113           choosing-strategy: 'gerrit'
114           submodule-recursive: '{submodule-recursive}'
115
116     wrappers:
117       - infra-wrappers:
118           build-timeout: '{build-timeout}'
119
120     triggers:
121       - gerrit:
122           server-name: '{server-name}'
123           trigger-on:
124             - change-merged-event
125             - comment-added-contains-event:
126                 comment-contains-value: 'remerge'
127           projects:
128             - project-compare-type: 'ANT'
129               project-pattern: '**'
130               branches:
131                 - branch-compare-type: 'ANT'
132                   branch-pattern: '**/{branch}'
133               file-paths:
134                 - compare-type: ANT
135                   pattern: docs/**/*.rst
136
137     builders:
138       - shell: !include-raw: doc-post-rtd.sh
139
140     publishers:
141       - infra-shiplogs:
142           maven-version: '{maven-version}'
143