blob: 17ae3693a4c4aa7199a92e8e575355af868c2371 [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':
Zack Williamsbf4cfe52018-05-14 16:29:57 -070010 project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$'
11 branch-regexp: '{supported-branches-regexp}'
12
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':
Zack Williamsa1d1fc62018-05-15 10:51:31 -070019 other-docs-repos-regexp: '^(cord-tester|xos|xos-gui|xos-tosca)$'
Zack Williamsbf4cfe52018-05-14 16:29:57 -070020 branch-regexp: '{modern-branches-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070021
22- project:
23 name: publish-docs
24
25 jobs:
26 - 'publish-documentation':
27 project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$'
28 branch-regexp: '{supported-branches-regexp}'
29
30# Documentation job templates
31- job-template:
Zack Williamsa1d1fc62018-05-15 10:51:31 -070032 id: verify-documentation-legacy
33 name: "verify-documentation-legacy"
Zack Williamsbf4cfe52018-05-14 16:29:57 -070034
35 triggers:
36 - cord-infra-gerrit-trigger-patchset:
37 gerrit-server-name: '{gerrit-server-name}'
38 project-regexp: '{project-regexp}'
39 branch-regexp: '{branch-regexp}'
40 file-include-regexp: '{doc-files-regexp}'
41 dependency-jobs: '{dependency-jobs}'
42
43 properties:
44 - cord-infra-properties:
45 build-days-to-keep: '{build-days-to-keep}'
46 artifact-num-to-keep: '{artifact-num-to-keep}'
47
48 wrappers:
49 - lf-infra-wrappers:
50 build-timeout: '{build-timeout}'
51 jenkins-ssh-credential: '{jenkins-ssh-credential}'
52
53 scm:
54 - cord-infra-gerrit-repo-scm:
55 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
56 branch: '$GERRIT_BRANCH'
57 destination-dir: 'cord'
58
59 node: '{build-node}'
60 project-type: freestyle
61 concurrent: false
62
63 builders:
64 - cord-infra-gerrit-repo-patch:
65 destination-dir: 'cord'
66 project: '$GERRIT_PROJECT'
67 change-number: '$GERRIT_CHANGE_NUMBER'
68 patchset-number: '$GERRIT_PATCHSET_NUMBER'
69 - shell: |
70 cd cord/build/docs
71 make test
72
73- job-template:
Zack Williamsc27ca2d2018-04-11 13:16:45 -070074 id: verify-documentation
Zack Williams7468c362018-04-06 09:52:30 -070075 name: "verify-documentation"
76
77 triggers:
Zack Williams0e594a32018-05-15 19:30:38 -070078 - gerrit:
79 server-name: '{gerrit-server-name}'
Zack Williamsa1d1fc62018-05-15 10:51:31 -070080 dependency-jobs: '{dependency-jobs}'
Zack Williams0e594a32018-05-15 19:30:38 -070081 silent-start: true
82 trigger-on:
83 - patchset-created-event:
84 exclude-drafts: true
85 exclude-trivial-rebase: false
86 exclude-no-code-change: true
87 - draft-published-event
88 - comment-added-contains-event:
89 comment-contains-value: '(?i)^.*recheck$'
90 projects:
91 - project-compare-type: PLAIN
92 project-pattern: 'docs'
93 branches:
94 - branch-compare-type: REG_EXP
95 branch-pattern: '{branch-regexp}'
96 file-paths:
97 - compare-type: REG_EXP
98 pattern: '{all-files-regexp}'
99 - project-compare-type: REG_EXP
100 project-pattern: '{other-docs-repos-regexp}'
101 branches:
102 - branch-compare-type: REG_EXP
103 branch-pattern: '{branch-regexp}'
104 file-paths:
105 - compare-type: REG_EXP
106 pattern: '{doc-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -0700107
108 properties:
109 - cord-infra-properties:
110 build-days-to-keep: '{build-days-to-keep}'
111 artifact-num-to-keep: '{artifact-num-to-keep}'
112
113 wrappers:
114 - lf-infra-wrappers:
115 build-timeout: '{build-timeout}'
116 jenkins-ssh-credential: '{jenkins-ssh-credential}'
117
118 scm:
119 - cord-infra-gerrit-repo-scm:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700120 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
Zack Williams7468c362018-04-06 09:52:30 -0700121 branch: '$GERRIT_BRANCH'
122 destination-dir: 'cord'
123
124 node: '{build-node}'
125 project-type: freestyle
126 concurrent: false
127
128 builders:
129 - cord-infra-gerrit-repo-patch:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700130 destination-dir: 'cord'
Zack Williams7468c362018-04-06 09:52:30 -0700131 project: '$GERRIT_PROJECT'
132 change-number: '$GERRIT_CHANGE_NUMBER'
133 patchset-number: '$GERRIT_PATCHSET_NUMBER'
134 - shell: |
Zack Williamsbf4cfe52018-05-14 16:29:57 -0700135 cd cord/docs
Zack Williams7468c362018-04-06 09:52:30 -0700136 make test
137
Zack Williams7468c362018-04-06 09:52:30 -0700138- job-template:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700139 id: publish-documentation
Zack Williams7468c362018-04-06 09:52:30 -0700140 name: 'publish-documentation'
141
142 triggers:
143 - cord-infra-gerrit-trigger-merge:
144 gerrit-server-name: '{gerrit-server-name}'
145 project-regexp: '{project-regexp}'
146 branch-regexp: '{branch-regexp}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700147 file-include-regexp: '{doc-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -0700148 dependency-jobs: '{dependency-jobs}'
149
150 properties:
151 - cord-infra-properties:
152 build-days-to-keep: '{build-days-to-keep}'
153 artifact-num-to-keep: '{artifact-num-to-keep}'
154
155 wrappers:
156 - lf-infra-wrappers:
157 build-timeout: '{build-timeout}'
158 jenkins-ssh-credential: '{jenkins-ssh-credential}'
159
160 scm:
161 - cord-infra-gerrit-repo-scm:
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700162 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
Zack Williams7468c362018-04-06 09:52:30 -0700163 branch: '$GERRIT_BRANCH'
164 destination-dir: 'cord'
165
166 node: '{build-node}'
167 project-type: freestyle
168 concurrent: false
169
170 builders:
171 - shell: |
172 cd cord/build/docs
173 make build
174
175# publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700176 publishers:
177 - ssh:
178 site: 'CORD Wiki'
179 source: 'cord/build/docs/_book/**'
180 remove-prefix: 'cord/build/docs/_book'
181 target: '//var/www/guide/$GERRIT_BRANCH'
182 - ssh:
183 site: 'CORD Wiki'
184 source: 'cord/build/docs/xos/swagger/**'
185 remove-prefix: 'cord/build/docs/xos'
186 target: '//var/www/guide/$GERRIT_BRANCH'
Zack Williams7468c362018-04-06 09:52:30 -0700187