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': |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 10 | 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 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': |
Zack Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 19 | other-docs-repos-regexp: '^(cord-tester|xos|xos-gui|xos-tosca)$' |
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: |
| 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 Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 32 | id: verify-documentation-legacy |
| 33 | name: "verify-documentation-legacy" |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 34 | |
| 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 74 | id: verify-documentation |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 75 | name: "verify-documentation" |
| 76 | |
| 77 | triggers: |
Zack Williams | 0e594a3 | 2018-05-15 19:30:38 -0700 | [diff] [blame] | 78 | - gerrit: |
| 79 | server-name: '{gerrit-server-name}' |
Zack Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 80 | dependency-jobs: '{dependency-jobs}' |
Zack Williams | 0e594a3 | 2018-05-15 19:30:38 -0700 | [diff] [blame] | 81 | 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 Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 107 | |
| 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 120 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 121 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 130 | destination-dir: 'cord' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 131 | project: '$GERRIT_PROJECT' |
| 132 | change-number: '$GERRIT_CHANGE_NUMBER' |
| 133 | patchset-number: '$GERRIT_PATCHSET_NUMBER' |
| 134 | - shell: | |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 135 | cd cord/docs |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 136 | make test |
| 137 | |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 138 | - job-template: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 139 | id: publish-documentation |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 140 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 147 | file-include-regexp: '{doc-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 148 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 162 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 163 | 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 176 | 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 Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 187 | |