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 | |
| 7 | # add repos that have documentation to the project list in both jobs |
| 8 | jobs: |
| 9 | - 'verify-documentation': |
| 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: |
| 14 | name: publish-docs |
| 15 | |
| 16 | jobs: |
| 17 | - 'publish-documentation': |
| 18 | project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$' |
| 19 | branch-regexp: '{supported-branches-regexp}' |
| 20 | |
| 21 | # Documentation job templates |
| 22 | - job-template: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 23 | id: verify-documentation |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 24 | name: "verify-documentation" |
| 25 | |
| 26 | triggers: |
| 27 | - cord-infra-gerrit-trigger-patchset: |
| 28 | gerrit-server-name: '{gerrit-server-name}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 29 | project-regexp: '{project-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 30 | branch-regexp: '{branch-regexp}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 31 | file-include-regexp: '{doc-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 32 | dependency-jobs: '{dependency-jobs}' |
| 33 | |
| 34 | properties: |
| 35 | - cord-infra-properties: |
| 36 | build-days-to-keep: '{build-days-to-keep}' |
| 37 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 38 | |
| 39 | wrappers: |
| 40 | - lf-infra-wrappers: |
| 41 | build-timeout: '{build-timeout}' |
| 42 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 43 | |
| 44 | scm: |
| 45 | - cord-infra-gerrit-repo-scm: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 46 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 47 | branch: '$GERRIT_BRANCH' |
| 48 | destination-dir: 'cord' |
| 49 | |
| 50 | node: '{build-node}' |
| 51 | project-type: freestyle |
| 52 | concurrent: false |
| 53 | |
| 54 | builders: |
| 55 | - cord-infra-gerrit-repo-patch: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 56 | destination-dir: 'cord' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 57 | project: '$GERRIT_PROJECT' |
| 58 | change-number: '$GERRIT_CHANGE_NUMBER' |
| 59 | patchset-number: '$GERRIT_PATCHSET_NUMBER' |
| 60 | - shell: | |
| 61 | cd cord/build/docs |
| 62 | make test |
| 63 | |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 64 | - job-template: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 65 | id: publish-documentation |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 66 | name: 'publish-documentation' |
| 67 | |
| 68 | triggers: |
| 69 | - cord-infra-gerrit-trigger-merge: |
| 70 | gerrit-server-name: '{gerrit-server-name}' |
| 71 | project-regexp: '{project-regexp}' |
| 72 | branch-regexp: '{branch-regexp}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 73 | file-include-regexp: '{doc-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 74 | dependency-jobs: '{dependency-jobs}' |
| 75 | |
| 76 | properties: |
| 77 | - cord-infra-properties: |
| 78 | build-days-to-keep: '{build-days-to-keep}' |
| 79 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 80 | |
| 81 | wrappers: |
| 82 | - lf-infra-wrappers: |
| 83 | build-timeout: '{build-timeout}' |
| 84 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 85 | |
| 86 | scm: |
| 87 | - cord-infra-gerrit-repo-scm: |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 88 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 89 | branch: '$GERRIT_BRANCH' |
| 90 | destination-dir: 'cord' |
| 91 | |
| 92 | node: '{build-node}' |
| 93 | project-type: freestyle |
| 94 | concurrent: false |
| 95 | |
| 96 | builders: |
| 97 | - shell: | |
| 98 | cd cord/build/docs |
| 99 | make build |
| 100 | |
| 101 | # 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] | 102 | publishers: |
| 103 | - ssh: |
| 104 | site: 'CORD Wiki' |
| 105 | source: 'cord/build/docs/_book/**' |
| 106 | remove-prefix: 'cord/build/docs/_book' |
| 107 | target: '//var/www/guide/$GERRIT_BRANCH' |
| 108 | - ssh: |
| 109 | site: 'CORD Wiki' |
| 110 | source: 'cord/build/docs/xos/swagger/**' |
| 111 | remove-prefix: 'cord/build/docs/xos' |
| 112 | target: '//var/www/guide/$GERRIT_BRANCH' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 113 | |