Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 1 | --- |
| 2 | # CORD documentation verification and publish tasks |
| 3 | |
| 4 | - project: |
| 5 | name: verify-docs |
| 6 | |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 7 | jobs: |
| 8 | - 'verify-documentation': |
Zack Williams | 9a021d7 | 2018-05-25 16:59:25 -0700 | [diff] [blame] | 9 | other-docs-repos-regexp: '.*' |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 10 | branch-regexp: '{modern-branches-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 11 | |
| 12 | - project: |
| 13 | name: publish-docs |
| 14 | |
| 15 | jobs: |
| 16 | - 'publish-documentation': |
Zack Williams | 9a021d7 | 2018-05-25 16:59:25 -0700 | [diff] [blame] | 17 | other-docs-repos-regexp: '.*' |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 18 | branch-regexp: '{modern-branches-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 19 | |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 20 | - job-template: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 21 | id: verify-documentation |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 22 | name: "verify-documentation" |
| 23 | |
| 24 | triggers: |
Zack Williams | 0e594a3 | 2018-05-15 19:30:38 -0700 | [diff] [blame] | 25 | - gerrit: |
| 26 | server-name: '{gerrit-server-name}' |
Zack Williams | a1d1fc6 | 2018-05-15 10:51:31 -0700 | [diff] [blame] | 27 | dependency-jobs: '{dependency-jobs}' |
Zack Williams | 0e594a3 | 2018-05-15 19:30:38 -0700 | [diff] [blame] | 28 | silent-start: true |
| 29 | trigger-on: |
| 30 | - patchset-created-event: |
| 31 | exclude-drafts: true |
| 32 | exclude-trivial-rebase: false |
| 33 | exclude-no-code-change: true |
| 34 | - draft-published-event |
| 35 | - comment-added-contains-event: |
| 36 | comment-contains-value: '(?i)^.*recheck$' |
| 37 | projects: |
| 38 | - project-compare-type: PLAIN |
| 39 | project-pattern: 'docs' |
| 40 | branches: |
| 41 | - branch-compare-type: REG_EXP |
| 42 | branch-pattern: '{branch-regexp}' |
| 43 | file-paths: |
| 44 | - compare-type: REG_EXP |
| 45 | pattern: '{all-files-regexp}' |
| 46 | - project-compare-type: REG_EXP |
| 47 | project-pattern: '{other-docs-repos-regexp}' |
| 48 | branches: |
| 49 | - branch-compare-type: REG_EXP |
| 50 | branch-pattern: '{branch-regexp}' |
| 51 | file-paths: |
| 52 | - compare-type: REG_EXP |
| 53 | pattern: '{doc-files-regexp}' |
Kailash Khalasi | 21dc619 | 2018-05-31 08:44:13 -0700 | [diff] [blame] | 54 | file-paths: |
| 55 | - compare-type: REG_EXP |
| 56 | pattern: '.*\.md' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 57 | |
| 58 | properties: |
| 59 | - cord-infra-properties: |
| 60 | build-days-to-keep: '{build-days-to-keep}' |
| 61 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 62 | |
| 63 | wrappers: |
| 64 | - lf-infra-wrappers: |
| 65 | build-timeout: '{build-timeout}' |
| 66 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 67 | |
| 68 | scm: |
| 69 | - cord-infra-gerrit-repo-scm: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 70 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 71 | branch: '$GERRIT_BRANCH' |
| 72 | destination-dir: 'cord' |
| 73 | |
| 74 | node: '{build-node}' |
| 75 | project-type: freestyle |
| 76 | concurrent: false |
| 77 | |
| 78 | builders: |
| 79 | - cord-infra-gerrit-repo-patch: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 80 | destination-dir: 'cord' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 81 | project: '$GERRIT_PROJECT' |
| 82 | change-number: '$GERRIT_CHANGE_NUMBER' |
| 83 | patchset-number: '$GERRIT_PATCHSET_NUMBER' |
| 84 | - shell: | |
Zack Williams | bf4cfe5 | 2018-05-14 16:29:57 -0700 | [diff] [blame] | 85 | cd cord/docs |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 86 | make test |
| 87 | |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 88 | - job-template: |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 89 | id: publish-documentation |
| 90 | name: 'publish-documentation' |
| 91 | |
| 92 | triggers: |
Zack Williams | 9a021d7 | 2018-05-25 16:59:25 -0700 | [diff] [blame] | 93 | - gerrit: |
| 94 | server-name: '{gerrit-server-name}' |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 95 | dependency-jobs: '{dependency-jobs}' |
Zack Williams | 9a021d7 | 2018-05-25 16:59:25 -0700 | [diff] [blame] | 96 | silent-start: true |
| 97 | trigger-on: |
| 98 | - change-merged-event |
| 99 | projects: |
| 100 | - project-compare-type: PLAIN |
| 101 | project-pattern: 'docs' |
| 102 | branches: |
| 103 | - branch-compare-type: REG_EXP |
| 104 | branch-pattern: '{branch-regexp}' |
| 105 | file-paths: |
| 106 | - compare-type: REG_EXP |
| 107 | pattern: '{all-files-regexp}' |
| 108 | - project-compare-type: REG_EXP |
| 109 | project-pattern: '{other-docs-repos-regexp}' |
| 110 | branches: |
| 111 | - branch-compare-type: REG_EXP |
| 112 | branch-pattern: '{branch-regexp}' |
| 113 | file-paths: |
| 114 | - compare-type: REG_EXP |
| 115 | pattern: '{doc-files-regexp}' |
Kailash Khalasi | ca59055 | 2018-05-24 15:09:42 -0700 | [diff] [blame] | 116 | |
| 117 | properties: |
| 118 | - cord-infra-properties: |
| 119 | build-days-to-keep: '{build-days-to-keep}' |
| 120 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 121 | |
| 122 | wrappers: |
| 123 | - lf-infra-wrappers: |
| 124 | build-timeout: '{build-timeout}' |
| 125 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 126 | |
| 127 | scm: |
| 128 | - cord-infra-gerrit-repo-scm: |
| 129 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
| 130 | branch: '$GERRIT_BRANCH' |
| 131 | destination-dir: 'cord' |
| 132 | |
| 133 | node: '{build-node}' |
| 134 | project-type: freestyle |
| 135 | concurrent: false |
| 136 | |
| 137 | builders: |
| 138 | - shell: | |
| 139 | cd cord/docs |
| 140 | make build |
| 141 | |
| 142 | # publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh |
| 143 | publishers: |
| 144 | - ssh: |
| 145 | site: '{docs-ssh-host}' |
| 146 | source: 'cord/docs/_book/**' |
| 147 | remove-prefix: 'cord/docs/_book' |
| 148 | target: '//var/www/guide/$GERRIT_BRANCH' |
| 149 | - ssh: |
| 150 | site: '{docs-ssh-host}' |
| 151 | source: 'cord/docs/xos/swagger/**' |
| 152 | remove-prefix: 'cord/docs/xos' |
| 153 | target: '//var/www/guide/$GERRIT_BRANCH' |