blob: e3fc1654ab9fa16566ebf1b97d5219206273b6e8 [file] [log] [blame]
Zack Williams7468c362018-04-06 09:52:30 -07001---
2# CORD documentation verification and publish tasks
3
4- project:
Zack Williamsbf4cfe52018-05-14 16:29:57 -07005 name: verify-docs-legacy
6
7 # add repos that have documentation to the project list in both jobs
8 jobs:
Zack Williamsa1d1fc62018-05-15 10:51:31 -07009 - 'verify-documentation-legacy':
Kailash Khalasica590552018-05-24 15:09:42 -070010 project-regexp: '^.*$'
11 branch-regexp: '{legacy-branches-regexp}'
Zack Williamsbf4cfe52018-05-14 16:29:57 -070012
13- project:
Zack Williams7468c362018-04-06 09:52:30 -070014 name: verify-docs
15
16 # add repos that have documentation to the project list in both jobs
17 jobs:
18 - 'verify-documentation':
Kailash Khalasica590552018-05-24 15:09:42 -070019 other-docs-repos-regexp: '^.*$'
Zack Williamsbf4cfe52018-05-14 16:29:57 -070020 branch-regexp: '{modern-branches-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070021
22- project:
Kailash Khalasica590552018-05-24 15:09:42 -070023 name: publish-docs-legacy
24
25 jobs:
26 - 'publish-documentation-legacy':
27 project-regexp: '^.*$'
28 branch-regexp: '{legacy-branches-regexp}'
29
30- project:
Zack Williams7468c362018-04-06 09:52:30 -070031 name: publish-docs
32
33 jobs:
34 - 'publish-documentation':
Kailash Khalasica590552018-05-24 15:09:42 -070035 project-regexp: '^.*$'
36 branch-regexp: '{modern-branches-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070037
38# Documentation job templates
39- job-template:
Zack Williamsa1d1fc62018-05-15 10:51:31 -070040 id: verify-documentation-legacy
41 name: "verify-documentation-legacy"
Zack Williamsbf4cfe52018-05-14 16:29:57 -070042
43 triggers:
44 - cord-infra-gerrit-trigger-patchset:
45 gerrit-server-name: '{gerrit-server-name}'
46 project-regexp: '{project-regexp}'
47 branch-regexp: '{branch-regexp}'
48 file-include-regexp: '{doc-files-regexp}'
49 dependency-jobs: '{dependency-jobs}'
50
51 properties:
52 - cord-infra-properties:
53 build-days-to-keep: '{build-days-to-keep}'
54 artifact-num-to-keep: '{artifact-num-to-keep}'
55
56 wrappers:
57 - lf-infra-wrappers:
58 build-timeout: '{build-timeout}'
59 jenkins-ssh-credential: '{jenkins-ssh-credential}'
60
61 scm:
62 - cord-infra-gerrit-repo-scm:
63 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
64 branch: '$GERRIT_BRANCH'
65 destination-dir: 'cord'
66
67 node: '{build-node}'
68 project-type: freestyle
69 concurrent: false
70
71 builders:
72 - cord-infra-gerrit-repo-patch:
73 destination-dir: 'cord'
74 project: '$GERRIT_PROJECT'
75 change-number: '$GERRIT_CHANGE_NUMBER'
76 patchset-number: '$GERRIT_PATCHSET_NUMBER'
77 - shell: |
78 cd cord/build/docs
79 make test
80
81- job-template:
Zack Williamsc27ca2d2018-04-11 13:16:45 -070082 id: verify-documentation
Zack Williams7468c362018-04-06 09:52:30 -070083 name: "verify-documentation"
84
85 triggers:
Zack Williams0e594a32018-05-15 19:30:38 -070086 - gerrit:
87 server-name: '{gerrit-server-name}'
Zack Williamsa1d1fc62018-05-15 10:51:31 -070088 dependency-jobs: '{dependency-jobs}'
Zack Williams0e594a32018-05-15 19:30:38 -070089 silent-start: true
90 trigger-on:
91 - patchset-created-event:
92 exclude-drafts: true
93 exclude-trivial-rebase: false
94 exclude-no-code-change: true
95 - draft-published-event
96 - comment-added-contains-event:
97 comment-contains-value: '(?i)^.*recheck$'
98 projects:
99 - project-compare-type: PLAIN
100 project-pattern: 'docs'
101 branches:
102 - branch-compare-type: REG_EXP
103 branch-pattern: '{branch-regexp}'
104 file-paths:
105 - compare-type: REG_EXP
106 pattern: '{all-files-regexp}'
107 - project-compare-type: REG_EXP
108 project-pattern: '{other-docs-repos-regexp}'
109 branches:
110 - branch-compare-type: REG_EXP
111 branch-pattern: '{branch-regexp}'
112 file-paths:
113 - compare-type: REG_EXP
114 pattern: '{doc-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -0700115
116 properties:
117 - cord-infra-properties:
118 build-days-to-keep: '{build-days-to-keep}'
119 artifact-num-to-keep: '{artifact-num-to-keep}'
120
121 wrappers:
122 - lf-infra-wrappers:
123 build-timeout: '{build-timeout}'
124 jenkins-ssh-credential: '{jenkins-ssh-credential}'
125
126 scm:
127 - cord-infra-gerrit-repo-scm:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700128 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
Zack Williams7468c362018-04-06 09:52:30 -0700129 branch: '$GERRIT_BRANCH'
130 destination-dir: 'cord'
131
132 node: '{build-node}'
133 project-type: freestyle
134 concurrent: false
135
136 builders:
137 - cord-infra-gerrit-repo-patch:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700138 destination-dir: 'cord'
Zack Williams7468c362018-04-06 09:52:30 -0700139 project: '$GERRIT_PROJECT'
140 change-number: '$GERRIT_CHANGE_NUMBER'
141 patchset-number: '$GERRIT_PATCHSET_NUMBER'
142 - shell: |
Zack Williamsbf4cfe52018-05-14 16:29:57 -0700143 cd cord/docs
Zack Williams7468c362018-04-06 09:52:30 -0700144 make test
145
Zack Williams7468c362018-04-06 09:52:30 -0700146- job-template:
Kailash Khalasica590552018-05-24 15:09:42 -0700147 id: publish-documentation-legacy
148 name: 'publish-documentation-legacy'
Zack Williams7468c362018-04-06 09:52:30 -0700149
150 triggers:
151 - cord-infra-gerrit-trigger-merge:
152 gerrit-server-name: '{gerrit-server-name}'
153 project-regexp: '{project-regexp}'
154 branch-regexp: '{branch-regexp}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700155 file-include-regexp: '{doc-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -0700156 dependency-jobs: '{dependency-jobs}'
157
158 properties:
159 - cord-infra-properties:
160 build-days-to-keep: '{build-days-to-keep}'
161 artifact-num-to-keep: '{artifact-num-to-keep}'
162
163 wrappers:
164 - lf-infra-wrappers:
165 build-timeout: '{build-timeout}'
166 jenkins-ssh-credential: '{jenkins-ssh-credential}'
167
168 scm:
169 - cord-infra-gerrit-repo-scm:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700170 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
Zack Williams7468c362018-04-06 09:52:30 -0700171 branch: '$GERRIT_BRANCH'
172 destination-dir: 'cord'
173
174 node: '{build-node}'
175 project-type: freestyle
176 concurrent: false
177
178 builders:
179 - shell: |
180 cd cord/build/docs
181 make build
182
183# publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700184 publishers:
185 - ssh:
Kailash Khalasica590552018-05-24 15:09:42 -0700186 site: '{docs-ssh-host}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700187 source: 'cord/build/docs/_book/**'
188 remove-prefix: 'cord/build/docs/_book'
189 target: '//var/www/guide/$GERRIT_BRANCH'
190 - ssh:
Kailash Khalasica590552018-05-24 15:09:42 -0700191 site: '{docs-ssh-host}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700192 source: 'cord/build/docs/xos/swagger/**'
193 remove-prefix: 'cord/build/docs/xos'
194 target: '//var/www/guide/$GERRIT_BRANCH'
Zack Williams7468c362018-04-06 09:52:30 -0700195
Kailash Khalasica590552018-05-24 15:09:42 -0700196
197- job-template:
198 id: publish-documentation
199 name: 'publish-documentation'
200
201 triggers:
202 - cord-infra-gerrit-trigger-merge:
203 gerrit-server-name: '{gerrit-server-name}'
204 project-regexp: '{project-regexp}'
205 branch-regexp: '{branch-regexp}'
206 file-include-regexp: '{doc-files-regexp}'
207 dependency-jobs: '{dependency-jobs}'
208
209 properties:
210 - cord-infra-properties:
211 build-days-to-keep: '{build-days-to-keep}'
212 artifact-num-to-keep: '{artifact-num-to-keep}'
213
214 wrappers:
215 - lf-infra-wrappers:
216 build-timeout: '{build-timeout}'
217 jenkins-ssh-credential: '{jenkins-ssh-credential}'
218
219 scm:
220 - cord-infra-gerrit-repo-scm:
221 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
222 branch: '$GERRIT_BRANCH'
223 destination-dir: 'cord'
224
225 node: '{build-node}'
226 project-type: freestyle
227 concurrent: false
228
229 builders:
230 - shell: |
231 cd cord/docs
232 make build
233
234# publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh
235 publishers:
236 - ssh:
237 site: '{docs-ssh-host}'
238 source: 'cord/docs/_book/**'
239 remove-prefix: 'cord/docs/_book'
240 target: '//var/www/guide/$GERRIT_BRANCH'
241 - ssh:
242 site: '{docs-ssh-host}'
243 source: 'cord/docs/xos/swagger/**'
244 remove-prefix: 'cord/docs/xos'
245 target: '//var/www/guide/$GERRIT_BRANCH'