Merge "Do not use capital letters to refer to osa"
[releng.git] / jjb / xci / osa-periodic-jobs.yml
1 ---
2 - project:
3     name: 'opnfv-osa-periodic'
4
5     project: 'releng-xci'
6     # -------------------------------
7     # branches
8     # -------------------------------
9     stream:
10       - master:
11           branch: '{stream}'
12     # -------------------------------
13     # distros
14     # -------------------------------
15     distro:
16       - 'xenial':
17           disabled: false
18       - 'centos7':
19           disabled: true
20       - 'suse':
21           disabled: true
22     # -------------------------------
23     # type
24     # -------------------------------
25     type:
26       - virtual
27     # -------------------------------
28     # phases
29     # -------------------------------
30     phase:
31       - 'deploy'
32       - 'healthcheck'
33     # -------------------------------
34     # jobs
35     # -------------------------------
36     jobs:
37       - 'osa-periodic-{distro}-{type}-{stream}'
38       - 'osa-periodic-{phase}-{type}-{stream}'
39
40 # -------------------------------
41 # job templates
42 # -------------------------------
43 - job-template:
44     name: 'osa-periodic-{distro}-{type}-{stream}'
45
46     project-type: multijob
47
48     disabled: '{obj:disabled}'
49
50     concurrent: false
51
52     properties:
53       - logrotate-default
54       - build-blocker:
55           use-build-blocker: true
56           blocking-jobs:
57             - 'xci-verify-.*'
58             - 'bifrost-verify-.*'
59             - 'bifrost-periodic-.*'
60             - 'osa-verify-.*'
61             - 'osa-periodic-.*'
62           block-level: 'NODE'
63
64     wrappers:
65       - ssh-agent-wrapper
66       - build-timeout:
67           timeout: 240
68       - fix-workspace-permissions
69
70     scm:
71       - git-scm-osa
72
73     triggers:
74       - pollscm:
75           cron: "@midnight"
76           ignore-post-commit-hooks: true
77
78     parameters:
79       - project-parameter:
80           project: '{project}'
81           branch: '{branch}'
82       - label:
83           name: SLAVE_LABEL
84           default: 'xci-virtual-{distro}'
85
86     builders:
87       - description-setter:
88           description: "Built on $NODE_NAME"
89       - multijob:
90           name: deploy
91           condition: SUCCESSFUL
92           projects:
93             - name: 'osa-periodic-deploy-{type}-{stream}'
94               current-parameters: true
95               predefined-parameters: |
96                 DISTRO={distro}
97                 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
98               git-revision: true
99               node-parameters: true
100               kill-phase-on: FAILURE
101               abort-all-job: true
102       - multijob:
103           name: healthcheck
104           condition: SUCCESSFUL
105           projects:
106             - name: 'osa-periodic-healthcheck-{type}-{stream}'
107               current-parameters: true
108               predefined-parameters: |
109                 DISTRO={distro}
110                 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
111                 FUNCTEST_MODE=tier
112                 FUNCTEST_TIER=healthcheck
113               node-parameters: true
114               kill-phase-on: NEVER
115               abort-all-job: false
116
117 - job-template:
118     name: 'osa-periodic-{phase}-{type}-{stream}'
119
120     disabled: false
121
122     concurrent: true
123
124     properties:
125       - logrotate-default
126       - build-blocker:
127           use-build-blocker: true
128           blocking-jobs:
129             - 'xci-verify-deploy-.*'
130             - 'xci-verify-healthcheck-.*'
131             - 'bifrost-verify-.*'
132             - 'bifrost-periodic-.*'
133             - 'osa-verify-deploy-.*'
134             - 'osa-verify-halthcheck-.*'
135             - 'osa-periodic-deploy-.*'
136             - 'osa-periodic-healthcheck-.*'
137           block-level: 'NODE'
138
139     parameters:
140       - project-parameter:
141           project: '{project}'
142           branch: '{branch}'
143       - label:
144           name: SLAVE_LABEL
145           default: 'xci-virtual-{distro}'
146       - string:
147           name: OPENSTACK_OSA_VERSION
148           default: 'master'
149       - string:
150           name: DISTRO
151           default: 'xenial'
152       - string:
153           name: DEPLOY_SCENARIO
154           default: 'os-nosdn-nofeature-noha'
155       - string:
156           name: XCI_FLAVOR
157           default: 'mini'
158       - string:
159           name: XCI_LOOP
160           default: 'periodic'
161       - string:
162           name: OPNFV_RELENG_DEV_PATH
163           default: $WORKSPACE/releng-xci
164       - string:
165           name: FUNCTEST_MODE
166           default: 'tier'
167       - string:
168           name: FUNCTEST_SUITE_NAME
169           default: 'healthcheck'
170       - string:
171           name: FORCE_MASTER
172           default: 'true'
173       - string:
174           name: GIT_BASE
175           default: https://gerrit.opnfv.org/gerrit/$PROJECT
176
177     scm:
178       - git-scm-osa
179
180     wrappers:
181       - ssh-agent-wrapper
182       - build-timeout:
183           timeout: 240
184       - fix-workspace-permissions
185
186     builders:
187       - description-setter:
188           description: "Built on $NODE_NAME"
189       - 'osa-periodic-{phase}-macro'
190
191 # -------------------------------
192 # builder macros
193 # -------------------------------
194 - builder:
195     name: 'osa-periodic-deploy-macro'
196     builders:
197       - shell: |
198           #!/bin/bash
199
200           # here we will
201           # - clone releng-xci repo as the jobs are running against openstack gerrit
202           #   and we need to clone releng-xci ourselves to $OPNFV_RELENG_DEV_PATH
203           # - run sources-branch-updater.sh from osa to update/pin the role versions
204           #   at the time this job gets triggered against osa master in case if the
205           #   deployment succeeds and we decide to bump version used by xci
206           # - copy generated role versions into $OPNFV_RELENG_DEV_PATH/xci/file
207           # - start the deployment by executing xci-deploy.sh as usual
208           #
209           # we might also need to pin versions of openstack services as well.
210
211           echo "Hello World!"
212
213 - builder:
214     name: 'osa-periodic-healthcheck-macro'
215     builders:
216       - shell: |
217           #!/bin/bash
218
219           echo "Hello World!"
220 # -------------------------------
221 # scm macro
222 # -------------------------------
223 - scm:
224     name: git-scm-osa
225     scm:
226       - git:
227           url: https://review.openstack.org/p/openstack/openstack-ansible.git
228           branches:
229             - master
230           timeout: 15