blob: 1151e17477fcfecd374acd04dda669ef5e1ee904 [file] [log] [blame]
Zack Williams9a021d72018-05-25 16:59:25 -07001---
2# Legacy CORD documentation verification and publish tasks
3
4- project:
5 name: verify-docs-legacy
6
7 jobs:
8 - 'verify-documentation-legacy':
9 project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$'
10 branch-regexp: '{legacy-branches-regexp}'
11
12- project:
13 name: publish-docs-legacy
14
15 jobs:
16 - 'publish-documentation-legacy':
17 project-regexp: '^(cord|platform-install|cord-tester|rcord|ecord|mcord|opencloud|xos|xos-gui|xos-tosca)$'
18 branch-regexp: '{legacy-branches-regexp}'
19
20- job-template:
21 id: verify-documentation-legacy
22 name: "verify-documentation-legacy"
23
24 triggers:
25 - cord-infra-gerrit-trigger-patchset:
26 gerrit-server-name: '{gerrit-server-name}'
27 project-regexp: '{project-regexp}'
28 branch-regexp: '{branch-regexp}'
29 file-include-regexp: '{doc-files-regexp}'
30 dependency-jobs: '{dependency-jobs}'
31
32 properties:
33 - cord-infra-properties:
34 build-days-to-keep: '{build-days-to-keep}'
35 artifact-num-to-keep: '{artifact-num-to-keep}'
36
37 wrappers:
38 - lf-infra-wrappers:
39 build-timeout: '{build-timeout}'
40 jenkins-ssh-credential: '{jenkins-ssh-credential}'
41
42 scm:
43 - cord-infra-gerrit-repo-scm:
44 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
45 branch: '$GERRIT_BRANCH'
46 destination-dir: 'cord'
47
48 node: '{build-node}'
49 project-type: freestyle
50 concurrent: false
51
52 builders:
53 - cord-infra-gerrit-repo-patch:
54 destination-dir: 'cord'
55 project: '$GERRIT_PROJECT'
56 change-number: '$GERRIT_CHANGE_NUMBER'
57 patchset-number: '$GERRIT_PATCHSET_NUMBER'
58 - shell: |
59 cd cord/build/docs
60 make test
61
62- job-template:
63 id: publish-documentation-legacy
64 name: 'publish-documentation-legacy'
65
66 triggers:
67 - cord-infra-gerrit-trigger-merge:
68 gerrit-server-name: '{gerrit-server-name}'
69 project-regexp: '{project-regexp}'
70 branch-regexp: '{branch-regexp}'
71 file-include-regexp: '{doc-files-regexp}'
72 dependency-jobs: '{dependency-jobs}'
73
74 properties:
75 - cord-infra-properties:
76 build-days-to-keep: '{build-days-to-keep}'
77 artifact-num-to-keep: '{artifact-num-to-keep}'
78
79 wrappers:
80 - lf-infra-wrappers:
81 build-timeout: '{build-timeout}'
82 jenkins-ssh-credential: '{jenkins-ssh-credential}'
83
84 scm:
85 - cord-infra-gerrit-repo-scm:
86 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
87 branch: '$GERRIT_BRANCH'
88 destination-dir: 'cord'
89
90 node: '{build-node}'
91 project-type: freestyle
92 concurrent: false
93
94 builders:
95 - shell: |
Zack Williams642e5f72018-06-05 13:24:13 -070096 #!/usr/bin/env bash
97
98 # Set up the ssh host keys for the docs host
99 mkdir -p ~/.ssh
100 echo '{docs-ssh-host-key}' >> ~/.ssh/known_hosts
101
102 # build the docs
103 cd cord/docs
Zack Williams9a021d72018-05-25 16:59:25 -0700104 make build
Zack Williams642e5f72018-06-05 13:24:13 -0700105
106 # copy swagger REST API docs first, then exclude deleting them when copying rest of guide
Zack Williams2cad0322018-06-05 14:01:45 -0700107 rsync -rvzh --delete _book/ {docs-ssh-host}:/var/www/guide/$GERRIT_BRANCH
108 rsync -rvzh --delete xos/swagger/ {docs-ssh-host}:/var/www/guide/$GERRIT_BRANCH/swagger
Zack Williams642e5f72018-06-05 13:24:13 -0700109