Enabling local environment
[ci-management.git] / jjb / iec / iec.yaml
1 ---
2 - project:
3     name: 'iec'
4     project-name: 'iec'
5     project: '{project-name}'
6     views:
7       - project-view
8     # -------------------------------
9     # BRANCH DEFINITIONS
10     # -------------------------------
11     stream:
12       - master:
13           branch: '{stream}'
14           gs-pathname: ''
15           disabled: false
16
17     # -------------------------------
18     # INSTALLER DEFINITIONS
19     # -------------------------------
20     installer:
21       - fuel
22       - compass
23
24     # -------------------------------
25     # DEPLOY TYPE DEFINITIONS
26     # -------------------------------
27     deploy_type:
28       - baremetal:
29           slave-label: 'aarch64_dev'
30           scenario: 'k8-calico-iec-noha'
31       - virtual:
32           slave-label: 'aarch64_dev'
33           scenario: 'k8-calico-iec-noha'
34
35     exclude:
36       # Compass does not run against baremetal PODs yet
37       - installer: compass
38         deploy_type: baremetal
39
40     # -------------------------------
41     # USECASE DEFINITIONS
42     # -------------------------------
43     usecase:
44       - seba_on_arm:
45           slave-label: 'aarch64_dev'
46           scenario: 'k8-calico-iec-noha'
47
48     jobs:
49       - 'iec-{installer}-{deploy_type}-daily-{stream}'
50       - 'iec-deploy-{installer}-{deploy_type}-daily-{stream}'
51       - 'iec-destroy-{installer}-{deploy_type}-daily-{stream}'
52       - 'iec-install-{usecase}-{installer}-{deploy_type}-daily-{stream}'
53
54 ##############
55 # PARAMETERS #
56 ##############
57 - parameter:
58     name: 'iec-defaults'
59     parameters:
60       - string:
61           name: INSTALLER_IP
62           default: '10.20.0.2'
63           description: 'IP of the installer'
64       - string:
65           name: SSH_KEY
66           default: '/var/lib/opnfv/mcp.rsa'
67           description: 'Path to private SSH key to access environment nodes'
68       - string:
69           name: EXTERNAL_NETWORK
70           default: 'floating_net'
71           description: 'external network for test'
72       - string:
73           name: CI_DEBUG
74           default: 'false'
75           description: 'Show debug output information'
76       - string:
77           name: ARCHIVE_ARTIFACTS
78           default: '**/*.log'
79           description: Artifacts to archive to the logs server.
80 - parameter:
81     name: 'seba_on_arm-defaults'
82     parameters:
83       - string:
84           name: K8S_SSH_USER
85           default: 'ubuntu'
86           description: 'SSH username to connect to the K8s master '
87       - string:
88           name: K8S_SSH_PASSWORD
89           default: ''
90           description: 'SSH password to connect to the K8s master'
91       - string:
92           name: K8S_SSH_KEY
93           default: ''
94           description: 'SSH key to connect to the K8s master'
95       - string:
96           name: K8S_MASTER_IP_COMPASS
97           default: '10.1.0.50'
98           description: 'IP address to compass connect to the K8s master'
99       - string:
100           name: K8S_SSH_PASSWORD_COMPASS
101           default: 'root'
102           description: 'SSH password to compass connect to the K8s master'
103       - string:
104           name: K8S_SSH_USER_COMPASS
105           default: 'root'
106           description: 'SSH username to compass connect to the K8s master'
107
108 ########################
109 # job templates
110 ########################
111 - job-template:
112     name: 'iec-{installer}-{deploy_type}-daily-{stream}'
113     disabled: '{obj:disabled}'
114     concurrent: false
115     node: '{slave-label}'
116     properties:
117       - throttle:
118           enabled: true
119           max-total: 4
120           max-per-node: 1
121           option: 'project'
122       - build-blocker:
123           use-build-blocker: true
124           blocking-jobs:
125             - '.*-fuel-{deploy_type}-daily-.*'
126             - '.*-compass-{deploy_type}-daily-.*'
127           blocking-level: 'NODE'
128
129     wrappers:
130       - build-name:
131           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
132
133     triggers:
134       - 'iec-{installer}-{deploy_type}-daily-{stream}-trigger'
135
136     parameters:
137       - lf-infra-parameters:
138           project: '{project}'
139           stream: '{stream}'
140           branch: '{branch}'
141       - '{project}-defaults'
142       - string:
143           name: DEPLOY_SCENARIO
144           default: '{scenario}'
145
146     builders:
147       - trigger-builds:
148           - project: 'iec-deploy-{installer}-{deploy_type}-daily-{stream}'
149             current-parameters: false
150             predefined-parameters:
151               DEPLOY_SCENARIO={scenario}
152             same-node: true
153             block: true
154           - project:
155               !j2: |
156                 {%- for uc in usecase -%}
157                 iec-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-daily-{{ stream }}
158                 {%- if not loop.last -%},{%- endif -%}
159                 {%- endfor %}
160             current-parameters: false
161             same-node: true
162             block: true
163             block-thresholds:
164               build-step-failure-threshold: 'never'
165               failure-threshold: 'never'
166               unstable-threshold: 'FAILURE'
167           - project: 'iec-destroy-{installer}-{deploy_type}-daily-{stream}'
168             current-parameters: false
169             predefined-parameters:
170               DEPLOY_SCENARIO={scenario}
171             same-node: true
172             block: true
173
174 - job-template:
175     name: 'iec-deploy-{installer}-{deploy_type}-daily-{stream}'
176     concurrent: true
177     node: '{slave-label}'
178     properties: &properties
179       - throttle:
180           enabled: true
181           max-total: 4
182           max-per-node: 1
183           option: 'project'
184       - build-blocker:
185           use-build-blocker: true
186           blocking-jobs:
187             - '.*-deploy-{installer}-{deploy_type}-daily-.*'
188             - '.*-destroy-{installer}-{deploy_type}-daily-.*'
189             - '.*-install-.*-{installer}-{deploy_type}-daily-.*'
190           blocking-level: 'NODE'
191
192     parameters:
193       - lf-infra-parameters:
194           project: '{project}'
195           stream: '{stream}'
196           branch: '{branch}'
197       - '{project}-defaults'
198       - string:
199           name: DEPLOY_SCENARIO
200           default: '{scenario}'
201
202     wrappers: &wrappers
203       - build-name:
204           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
205
206     scm: &scm
207       - git:
208           credentials-id: '{jenkins-ssh-credential}'
209           url: '{git-url}/{project}.git'
210           refspec: ''
211           branches:
212             - 'refs/heads/{branch}'
213           skip-tag: true
214           wipe-workspace: true
215           submodule:
216             disable: true
217             recursive: false
218             timeout: '{submodule-timeout}'
219           choosing-strategy: default
220
221     builders:
222       - description-setter:
223           description: "POD: $NODE_NAME"
224       - conditional-step:
225           condition-kind: regex-match
226           regex: 'compass'
227           label: '{installer}'
228           steps:
229             - shell:
230                 !include-raw-escape: ./iec-compass-build.sh
231             - shell:
232                 !include-raw-escape: ./iec-compass-deploy.sh
233             - shell:
234                 !include-raw-escape: ./iec-fdn-install.sh
235       - conditional-step:
236           condition-kind: regex-match
237           regex: 'fuel'
238           label: '{installer}'
239           steps:
240             - shell:
241                 !include-raw-escape: ./iec-fuel-deploy.sh
242
243     publishers: &publishers
244       - email:
245           recipients: armband@enea.com
246       - lf-infra-publish
247
248 - job-template:
249     name: 'iec-destroy-{installer}-{deploy_type}-daily-{stream}'
250     concurrent: true
251     node: '{slave-label}'
252     properties: *properties
253     parameters:
254       - lf-infra-parameters:
255           project: '{project}'
256           stream: '{stream}'
257           branch: '{branch}'
258       - '{project}-defaults'
259       - string:
260           name: DEPLOY_SCENARIO
261           default: '{scenario}'
262       - string:
263           name: EXTRA_ARGS
264           default: '-EEE'
265
266     wrappers: *wrappers
267     scm: *scm
268
269     builders:
270       - description-setter:
271           description: "POD: $NODE_NAME"
272       - shell:
273           !include-raw-escape: ./iec-{installer}-destroy.sh
274
275     publishers: *publishers
276
277 - job-template:
278     name: 'iec-install-{usecase}-{installer}-{deploy_type}-daily-{stream}'
279     concurrent: true
280     node: '{slave-label}'
281     properties: *properties
282
283     parameters:
284       - lf-infra-parameters:
285           project: '{project}'
286           stream: '{stream}'
287           branch: '{branch}'
288       - '{project}-defaults'
289       - '{usecase}-defaults'
290
291     wrappers:
292       - build-name:
293           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${installer}-${deploy_type}'
294
295     scm: *scm
296
297     builders:
298       - shell:
299           !include-raw-escape: ./iec-{usecase}.sh
300
301     publishers: *publishers
302
303 ########################
304 # trigger macros
305 ########################
306 # CI PODs
307 # ----------------------------------------------------------------
308 # Akraino IEC CI Baremetal Triggers running against master branch
309 # ----------------------------------------------------------------
310 - trigger:
311     name: 'iec-fuel-virtual-daily-master-trigger'
312     triggers:
313       - timed: '0 1 * * *'
314 - trigger:
315     name: 'iec-fuel-baremetal-daily-master-trigger'
316     triggers:
317       - timed: ''
318 - trigger:
319     name: 'iec-compass-virtual-daily-master-trigger'
320     triggers:
321       - timed: '0 13 * * *'