Merge "Add IEC Foundation Framework Deployment Work"
[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-fdn-install.sh
200             - shell:
201                 !include-raw-escape: ./iec-compass-destroy.sh
202       - conditional-step:
203           condition-kind: regex-match
204           regex: 'fuel-.*'
205           label: '{deploy_type}'
206           steps:
207             - shell:
208                 !include-raw-escape: ./iec-fuel-deploy.sh
209
210     publishers:
211       - email:
212           recipients: armband@enea.com
213       - lf-infra-publish
214
215 - job-template:
216     name: 'iec-install-{usecase}-{deploy_type}-daily-{stream}'
217     concurrent: true
218     node: '{slave-label}'
219     properties:
220       - throttle:
221           enabled: true
222           max-total: 4
223           max-per-node: 1
224           option: 'project'
225       - build-blocker:
226           use-build-blocker: true
227           blocking-jobs:
228             - '.*-deploy-{deploy_type}-daily-*'
229             - '.*-install-{usecase}-{deploy_type}-daily-*'
230           blocking-level: 'NODE'
231
232     parameters:
233       - lf-infra-parameters:
234           project: '{project}'
235           stream: '{stream}'
236           branch: '{branch}'
237       - '{project}-defaults'
238       - '{usecase}-defaults'
239
240     wrappers:
241       - build-name:
242           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${deploy_type}'
243
244     scm: *scm
245
246     builders:
247       - shell:
248           !include-raw-escape: ./iec-{usecase}.sh
249
250     publishers:
251       - email:
252           recipients: armband@enea.com
253       - lf-infra-publish
254
255 ########################
256 # trigger macros
257 ########################
258 # CI PODs
259 # ----------------------------------------------------------------
260 # Akraino IEC CI Baremetal Triggers running against master branch
261 # ----------------------------------------------------------------
262 - trigger:
263     name: 'iec-fuel-virtual-daily-master-trigger'
264     triggers:
265       - timed: '0 1 * * *'
266 - trigger:
267     name: 'iec-fuel-baremetal-daily-master-trigger'
268     triggers:
269       - timed: ''
270 - trigger:
271     name: 'iec-compass-virtual-daily-master-trigger'
272     triggers:
273       - timed: '0 13 * * *'