Initial job for deploying SEBA on ARM
[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 - parameter:
67     name: 'seba_on_arm-defaults'
68     parameters:
69       - string:
70           name: K8S_SSH_USER
71           default: 'ubuntu'
72           description: 'SSH username to connect to the K8s master '
73       - string:
74           name: K8S_SSH_PASSWORD
75           default: ''
76           description: 'SSH password to connect to the K8s master'
77       - string:
78           name: K8S_SSH_KEY
79           default: ''
80           description: 'SSH key to connect to the K8s master'
81
82 ########################
83 # job templates
84 ########################
85 - job-template:
86     name: 'iec-{deploy-type}-daily-{stream}'
87     disabled: '{obj:disabled}'
88     concurrent: false
89     node: '{slave-label}'
90     properties:
91       - throttle:
92           enabled: true
93           max-total: 4
94           max-per-node: 1
95           option: 'project'
96       - build-blocker:
97           use-build-blocker: true
98           blocking-jobs:
99             - '.*-{deploy-type}-daily-.*'
100           blocking-level: 'NODE'
101
102     wrappers:
103       - build-name:
104           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
105
106     triggers:
107       - 'iec-{deploy-type}-daily-{stream}-trigger'
108
109     parameters:
110       - lf-infra-parameters:
111           project: '{project}'
112           stream: '{stream}'
113           branch: '{branch}'
114       - '{project}-defaults'
115       - string:
116           name: DEPLOY_SCENARIO
117           default: '{scenario}'
118
119     builders:
120       - trigger-builds:
121           - project: 'iec-deploy-{deploy-type}-daily-{stream}'
122             current-parameters: false
123             predefined-parameters: |
124               DEPLOY_SCENARIO={scenario}
125             same-node: true
126             block: true
127           - project: 'iec-install-{usecase}-daily-{stream}'
128             current-parameters: false
129             same-node: true
130             block: true
131
132 - job-template:
133     name: 'iec-deploy-{deploy-type}-daily-{stream}'
134     concurrent: true
135     node: '{slave-label}'
136     properties:
137       - throttle:
138           enabled: true
139           max-total: 4
140           max-per-node: 1
141           option: 'project'
142       - build-blocker:
143           use-build-blocker: true
144           blocking-jobs:
145             - '.*-deploy-{deploy-type}-daily-*'
146           blocking-level: 'NODE'
147
148     parameters:
149       - lf-infra-parameters:
150           project: '{project}'
151           stream: '{stream}'
152           branch: '{branch}'
153       - '{project}-defaults'
154       - string:
155           name: DEPLOY_SCENARIO
156           default: '{scenario}'
157
158     wrappers:
159       - build-name:
160           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
161
162     scm: &scm
163       - git:
164           credentials-id: '{jenkins-ssh-credential}'
165           url: '{git-url}/{project}.git'
166           refspec: ''
167           branches:
168             - 'refs/heads/{branch}'
169           skip-tag: true
170           wipe-workspace: true
171           submodule:
172             disable: true
173             recursive: false
174             timeout: '{submodule-timeout}'
175           choosing-strategy: default
176
177     builders:
178       - description-setter:
179           description: "POD: $NODE_NAME"
180       - conditional-step:
181           condition-kind: regex-match
182           regex: 'compass-.*'
183           label: '{deploy-type}'
184           steps:
185             - shell:
186                 !include-raw-escape: ./iec-compass-build.sh
187             - shell:
188                 !include-raw-escape: ./iec-compass-deploy.sh
189             - shell:
190                 !include-raw-escape: ./iec-compass-destroy.sh
191       - conditional-step:
192           condition-kind: regex-match
193           regex: 'fuel-.*'
194           label: '{deploy-type}'
195           steps:
196             - shell:
197                 !include-raw-escape: ./iec-fuel-deploy.sh
198
199     publishers:
200       - email:
201           recipients: armband@enea.com
202
203 - job-template:
204     name: 'iec-install-{usecase}-{deploy-type}-daily-{stream}'
205     concurrent: true
206     node: '{slave-label}'
207     properties:
208       - throttle:
209           enabled: true
210           max-total: 4
211           max-per-node: 1
212           option: 'project'
213       - build-blocker:
214           use-build-blocker: true
215           blocking-jobs:
216             - '.*-deploy-{deploy-type}-daily-*'
217             - '.*-install-{usecase}-{deploy-type}-daily-*'
218           blocking-level: 'NODE'
219
220     parameters:
221       - lf-infra-parameters:
222           project: '{project}'
223           stream: '{stream}'
224           branch: '{branch}'
225       - '{project}-defaults'
226       - '{usecase}-defaults'
227
228     wrappers:
229       - build-name:
230           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${deploy-type}'
231
232     scm: *scm
233
234     builders:
235       - shell:
236           !include-raw-escape: ./iec-{usecase}.sh
237
238     publishers:
239       - email:
240           recipients: armband@enea.com
241
242 ########################
243 # trigger macros
244 ########################
245 # CI PODs
246 # ----------------------------------------------------------------
247 # Akraino IEC CI Baremetal Triggers running against master branch
248 # ----------------------------------------------------------------
249 - trigger:
250     name: 'iec-fuel-virtual-daily-master-trigger'
251     triggers:
252       - timed: '0 1 * * *'
253 - trigger:
254     name: 'iec-fuel-baremetal-daily-master-trigger'
255     triggers:
256       - timed: ''
257 - trigger:
258     name: 'iec-compass-virtual-daily-master-trigger'
259     triggers:
260       - timed: '0 13 * * *'