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