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