Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 1 | --- |
| 2 | # CORD documentation verification and publish tasks |
| 3 | |
| 4 | - project: |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 5 | name: verify-docs-legacy |
| 6 | |
| 7 | # add repos that have documentation to the project list in both jobs |
| 8 | jobs: |
Zack Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 9 | - 'verify-documentation-legacy': |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 10 | project-regexp: '^.*$' |
| 11 | branch-regexp: '{legacy-branches-regexp}' |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 12 | |
| 13 | - project: |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 14 | name: verify-docs |
| 15 | |
| 16 | # add repos that have documentation to the project list in both jobs |
| 17 | jobs: |
| 18 | - 'verify-documentation': |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 19 | other-docs-repos-regexp: '^.*$' |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 20 | branch-regexp: '{modern-branches-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 21 | |
| 22 | - project: |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 23 | name: publish-docs-legacy |
| 24 | |
| 25 | jobs: |
| 26 | - 'publish-documentation-legacy': |
| 27 | project-regexp: '^.*$' |
| 28 | branch-regexp: '{legacy-branches-regexp}' |
| 29 | |
| 30 | - project: |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 31 | name: publish-docs |
| 32 | |
| 33 | jobs: |
| 34 | - 'publish-documentation': |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 35 | project-regexp: '^.*$' |
| 36 | branch-regexp: '{modern-branches-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 37 | |
| 38 | # Documentation job templates |
| 39 | - job-template: |
Zack Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 40 | id: verify-documentation-legacy |
| 41 | name: "verify-documentation-legacy" |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 42 | |
| 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 82 | id: verify-documentation |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 83 | name: "verify-documentation" |
| 84 | |
| 85 | triggers: |
Zack Williams | 0e594a3 | 2018-05-15 19:30:38 -0700 | [diff] [blame] | 86 | - gerrit: |
| 87 | server-name: '{gerrit-server-name}' |
Zack Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 88 | dependency-jobs: '{dependency-jobs}' |
Zack Williams | 0e594a3 | 2018-05-15 19:30:38 -0700 | [diff] [blame] | 89 | 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 Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 115 | |
| 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 128 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 129 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 138 | destination-dir: 'cord' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 139 | project: '$GERRIT_PROJECT' |
| 140 | change-number: '$GERRIT_CHANGE_NUMBER' |
| 141 | patchset-number: '$GERRIT_PATCHSET_NUMBER' |
| 142 | - shell: | |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 143 | cd cord/docs |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 144 | make test |
| 145 | |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 146 | - job-template: |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 147 | id: publish-documentation-legacy |
| 148 | name: 'publish-documentation-legacy' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 149 | |
| 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 155 | file-include-regexp: '{doc-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 156 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 170 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 171 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 184 | publishers: |
| 185 | - ssh: |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 186 | site: '{docs-ssh-host}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 187 | source: 'cord/build/docs/_book/**' |
| 188 | remove-prefix: 'cord/build/docs/_book' |
| 189 | target: '//var/www/guide/$GERRIT_BRANCH' |
| 190 | - ssh: |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 191 | site: '{docs-ssh-host}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 192 | source: 'cord/build/docs/xos/swagger/**' |
| 193 | remove-prefix: 'cord/build/docs/xos' |
| 194 | target: '//var/www/guide/$GERRIT_BRANCH' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 195 | |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 196 | |
| 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' |