Merge "Fixes to run in node, and in workspace"
[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
96 ########################
97 # job templates
98 ########################
99 - job-template:
100     name: 'iec-{installer}-{deploy_type}-daily-{stream}'
101     disabled: '{obj:disabled}'
102     concurrent: false
103     node: '{slave-label}'
104     properties:
105       - throttle:
106           enabled: true
107           max-total: 4
108           max-per-node: 1
109           option: 'project'
110       - build-blocker:
111           use-build-blocker: true
112           blocking-jobs:
113             - '.*-fuel-{deploy_type}-daily-.*'
114             - '.*-compass-{deploy_type}-daily-.*'
115           blocking-level: 'NODE'
116
117     wrappers:
118       - build-name:
119           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
120
121     triggers:
122       - 'iec-{installer}-{deploy_type}-daily-{stream}-trigger'
123
124     parameters:
125       - lf-infra-parameters:
126           project: '{project}'
127           stream: '{stream}'
128           branch: '{branch}'
129       - '{project}-defaults'
130       - string:
131           name: DEPLOY_SCENARIO
132           default: '{scenario}'
133
134     builders:
135       - trigger-builds:
136           - project: 'iec-deploy-{installer}-{deploy_type}-daily-{stream}'
137             current-parameters: false
138             predefined-parameters:
139               DEPLOY_SCENARIO={scenario}
140             same-node: true
141             block: true
142           - project:
143               !j2: |
144                 {%- for uc in usecase -%}
145                 iec-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-daily-{{ stream }}
146                 {%- if not loop.last -%},{%- endif -%}
147                 {%- endfor %}
148             current-parameters: false
149             same-node: true
150             block: true
151             block-thresholds:
152               build-step-failure-threshold: 'never'
153               failure-threshold: 'never'
154               unstable-threshold: 'FAILURE'
155           - project: 'iec-destroy-{installer}-{deploy_type}-daily-{stream}'
156             current-parameters: false
157             predefined-parameters:
158               DEPLOY_SCENARIO={scenario}
159             same-node: true
160             block: true
161
162 - job-template:
163     name: 'iec-deploy-{installer}-{deploy_type}-daily-{stream}'
164     concurrent: true
165     node: '{slave-label}'
166     properties: &properties
167       - throttle:
168           enabled: true
169           max-total: 4
170           max-per-node: 1
171           option: 'project'
172       - build-blocker:
173           use-build-blocker: true
174           blocking-jobs:
175             - '.*-deploy-{installer}-{deploy_type}-daily-.*'
176             - '.*-destroy-{installer}-{deploy_type}-daily-.*'
177             - '.*-install-.*-{installer}-{deploy_type}-daily-.*'
178           blocking-level: 'NODE'
179
180     parameters:
181       - lf-infra-parameters:
182           project: '{project}'
183           stream: '{stream}'
184           branch: '{branch}'
185       - '{project}-defaults'
186       - string:
187           name: DEPLOY_SCENARIO
188           default: '{scenario}'
189
190     wrappers: &wrappers
191       - build-name:
192           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
193
194     scm: &scm
195       - git:
196           credentials-id: '{jenkins-ssh-credential}'
197           url: '{git-url}/{project}.git'
198           refspec: ''
199           branches:
200             - 'refs/heads/{branch}'
201           skip-tag: true
202           wipe-workspace: true
203           submodule:
204             disable: true
205             recursive: false
206             timeout: '{submodule-timeout}'
207           choosing-strategy: default
208
209     builders:
210       - description-setter:
211           description: "POD: $NODE_NAME"
212       - conditional-step:
213           condition-kind: regex-match
214           regex: 'compass'
215           label: '{installer}'
216           steps:
217             - shell:
218                 !include-raw-escape: ./iec-compass-build.sh
219             - shell:
220                 !include-raw-escape: ./iec-compass-deploy.sh
221             - shell:
222                 !include-raw-escape: ./iec-fdn-install.sh
223       - conditional-step:
224           condition-kind: regex-match
225           regex: 'fuel'
226           label: '{installer}'
227           steps:
228             - shell:
229                 !include-raw-escape: ./iec-fuel-deploy.sh
230
231     publishers: &publishers
232       - email:
233           recipients: armband@enea.com
234       - lf-infra-publish
235
236 - job-template:
237     name: 'iec-destroy-{installer}-{deploy_type}-daily-{stream}'
238     concurrent: true
239     node: '{slave-label}'
240     properties: *properties
241     parameters:
242       - lf-infra-parameters:
243           project: '{project}'
244           stream: '{stream}'
245           branch: '{branch}'
246       - '{project}-defaults'
247       - string:
248           name: DEPLOY_SCENARIO
249           default: '{scenario}'
250       - string:
251           name: EXTRA_ARGS
252           default: '-EEE'
253
254     wrappers: *wrappers
255     scm: *scm
256
257     builders:
258       - description-setter:
259           description: "POD: $NODE_NAME"
260       - shell:
261           !include-raw-escape: ./iec-{installer}-destroy.sh
262
263     publishers: *publishers
264
265 - job-template:
266     name: 'iec-install-{usecase}-{installer}-{deploy_type}-daily-{stream}'
267     concurrent: true
268     node: '{slave-label}'
269     properties: *properties
270
271     parameters:
272       - lf-infra-parameters:
273           project: '{project}'
274           stream: '{stream}'
275           branch: '{branch}'
276       - '{project}-defaults'
277       - '{usecase}-defaults'
278
279     wrappers:
280       - build-name:
281           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${installer}-${deploy_type}'
282
283     scm: *scm
284
285     builders:
286       - shell:
287           !include-raw-escape: ./iec-{usecase}.sh
288
289     publishers: *publishers
290
291 ########################
292 # trigger macros
293 ########################
294 # CI PODs
295 # ----------------------------------------------------------------
296 # Akraino IEC CI Baremetal Triggers running against master branch
297 # ----------------------------------------------------------------
298 - trigger:
299     name: 'iec-fuel-virtual-daily-master-trigger'
300     triggers:
301       - timed: '0 1 * * *'
302 - trigger:
303     name: 'iec-fuel-baremetal-daily-master-trigger'
304     triggers:
305       - timed: ''
306 - trigger:
307     name: 'iec-compass-virtual-daily-master-trigger'
308     triggers:
309       - timed: '0 13 * * *'