Merge "Add watchdog into testresults server to restart docker containers."
[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-.*'
131                 - 'osa-periodic-.*'
132             block-level: 'NODE'
133
134     parameters:
135         - project-parameter:
136             project: '{project}'
137             branch: '{branch}'
138         - label:
139             name: SLAVE_LABEL
140             default: 'xci-virtual-{distro}'
141         - string:
142             name: OPENSTACK_OSA_VERSION
143             default: 'master'
144         - string:
145             name: DISTRO
146             default: 'xenial'
147         - string:
148             name: DEPLOY_SCENARIO
149             default: 'os-nosdn-nofeature-noha'
150         - string:
151             name: XCI_FLAVOR
152             default: 'mini'
153         - string:
154             name: XCI_LOOP
155             default: 'periodic'
156         - string:
157             name: OPNFV_RELENG_DEV_PATH
158             default: $WORKSPACE/releng-xci
159         - string:
160             name: FUNCTEST_SUITE_NAME
161             default: 'healthcheck'
162         - string:
163             name: ANSIBLE_VERBOSITY
164             default: '-vvvv'
165         - string:
166             name: FORCE_MASTER
167             default: 'true'
168         - string:
169             name: GIT_BASE
170             default: https://gerrit.opnfv.org/gerrit/$PROJECT
171
172     scm:
173         - git-scm-osa
174
175     wrappers:
176         - ssh-agent-wrapper
177         - build-timeout:
178             timeout: 240
179         - fix-workspace-permissions
180
181     builders:
182         - description-setter:
183             description: "Built on $NODE_NAME"
184         - 'osa-periodic-{phase}-macro'
185
186 #--------------------------------
187 # builder macros
188 #--------------------------------
189 - builder:
190     name: 'osa-periodic-deploy-macro'
191     builders:
192         - shell: |
193             #!/bin/bash
194
195             # here we will
196             # - clone releng-xci repo as the jobs are running against openstack gerrit
197             #   and we need to clone releng-xci ourselves to $OPNFV_RELENG_DEV_PATH
198             # - run sources-branch-updater.sh from osa to update/pin the role versions
199             #   at the time this job gets triggered against osa master in case if the
200             #   deployment succeeds and we decide to bump version used by xci
201             # - copy generated role versions into $OPNFV_RELENG_DEV_PATH/xci/file
202             # - start the deployment by executing xci-deploy.sh as usual
203             #
204             # we might also need to pin versions of openstack services as well.
205
206             echo "Hello World!"
207
208 - builder:
209     name: 'osa-periodic-healthcheck-macro'
210     builders:
211         - shell: |
212             #!/bin/bash
213
214             echo "Hello World!"
215 #--------------------------------
216 # scm macro
217 #--------------------------------
218 - scm:
219     name: git-scm-osa
220     scm:
221         - git:
222             url: https://review.openstack.org/p/openstack/openstack-ansible.git
223             branches:
224                 - master
225             timeout: 15