blob: e59fa44cff5042f9f44e80e28f7bb937652f3cca [file] [log] [blame]
Zack Williams7468c362018-04-06 09:52:30 -07001---
2# CORD documentation verification and publish tasks
3
4- project:
5 name: verify-docs
6
Zack Williams7468c362018-04-06 09:52:30 -07007 jobs:
8 - 'verify-documentation':
Zack Williams9a021d72018-05-25 16:59:25 -07009 other-docs-repos-regexp: '.*'
Zack Williamsbf4cfe52018-05-14 16:29:57 -070010 branch-regexp: '{modern-branches-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070011
12- project:
13 name: publish-docs
14
15 jobs:
16 - 'publish-documentation':
Zack Williams9a021d72018-05-25 16:59:25 -070017 other-docs-repos-regexp: '.*'
Kailash Khalasica590552018-05-24 15:09:42 -070018 branch-regexp: '{modern-branches-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070019
Zack Williamsbf4cfe52018-05-14 16:29:57 -070020- job-template:
Zack Williamsc27ca2d2018-04-11 13:16:45 -070021 id: verify-documentation
Zack Williams7468c362018-04-06 09:52:30 -070022 name: "verify-documentation"
23
24 triggers:
Zack Williams0e594a32018-05-15 19:30:38 -070025 - gerrit:
26 server-name: '{gerrit-server-name}'
Zack Williamsa1d1fc62018-05-15 10:51:31 -070027 dependency-jobs: '{dependency-jobs}'
Zack Williams0e594a32018-05-15 19:30:38 -070028 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}'
Zack Williams7468c362018-04-06 09:52:30 -070054
55 properties:
56 - cord-infra-properties:
57 build-days-to-keep: '{build-days-to-keep}'
58 artifact-num-to-keep: '{artifact-num-to-keep}'
59
60 wrappers:
61 - lf-infra-wrappers:
62 build-timeout: '{build-timeout}'
63 jenkins-ssh-credential: '{jenkins-ssh-credential}'
64
65 scm:
66 - cord-infra-gerrit-repo-scm:
Zack Williamsc27ca2d2018-04-11 13:16:45 -070067 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
Zack Williams7468c362018-04-06 09:52:30 -070068 branch: '$GERRIT_BRANCH'
69 destination-dir: 'cord'
70
71 node: '{build-node}'
72 project-type: freestyle
73 concurrent: false
74
75 builders:
76 - cord-infra-gerrit-repo-patch:
Zack Williamsc27ca2d2018-04-11 13:16:45 -070077 destination-dir: 'cord'
Zack Williams7468c362018-04-06 09:52:30 -070078 project: '$GERRIT_PROJECT'
79 change-number: '$GERRIT_CHANGE_NUMBER'
80 patchset-number: '$GERRIT_PATCHSET_NUMBER'
81 - shell: |
Zack Williamsbf4cfe52018-05-14 16:29:57 -070082 cd cord/docs
Zack Williams7468c362018-04-06 09:52:30 -070083 make test
84
Zack Williams7468c362018-04-06 09:52:30 -070085- job-template:
Kailash Khalasica590552018-05-24 15:09:42 -070086 id: publish-documentation
87 name: 'publish-documentation'
88
89 triggers:
Zack Williams9a021d72018-05-25 16:59:25 -070090 - gerrit:
91 server-name: '{gerrit-server-name}'
Kailash Khalasica590552018-05-24 15:09:42 -070092 dependency-jobs: '{dependency-jobs}'
Zack Williams9a021d72018-05-25 16:59:25 -070093 silent-start: true
94 trigger-on:
95 - change-merged-event
96 projects:
97 - project-compare-type: PLAIN
98 project-pattern: 'docs'
99 branches:
100 - branch-compare-type: REG_EXP
101 branch-pattern: '{branch-regexp}'
102 file-paths:
103 - compare-type: REG_EXP
104 pattern: '{all-files-regexp}'
105 - project-compare-type: REG_EXP
106 project-pattern: '{other-docs-repos-regexp}'
107 branches:
108 - branch-compare-type: REG_EXP
109 branch-pattern: '{branch-regexp}'
110 file-paths:
111 - compare-type: REG_EXP
112 pattern: '{doc-files-regexp}'
Kailash Khalasica590552018-05-24 15:09:42 -0700113
114 properties:
115 - cord-infra-properties:
116 build-days-to-keep: '{build-days-to-keep}'
117 artifact-num-to-keep: '{artifact-num-to-keep}'
118
119 wrappers:
120 - lf-infra-wrappers:
121 build-timeout: '{build-timeout}'
122 jenkins-ssh-credential: '{jenkins-ssh-credential}'
123
124 scm:
125 - cord-infra-gerrit-repo-scm:
126 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
127 branch: '$GERRIT_BRANCH'
128 destination-dir: 'cord'
129
130 node: '{build-node}'
131 project-type: freestyle
132 concurrent: false
133
134 builders:
135 - shell: |
136 cd cord/docs
137 make build
138
139# publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh
140 publishers:
141 - ssh:
142 site: '{docs-ssh-host}'
143 source: 'cord/docs/_book/**'
144 remove-prefix: 'cord/docs/_book'
145 target: '//var/www/guide/$GERRIT_BRANCH'
146 - ssh:
147 site: '{docs-ssh-host}'
148 source: 'cord/docs/xos/swagger/**'
149 remove-prefix: 'cord/docs/xos'
150 target: '//var/www/guide/$GERRIT_BRANCH'