Merge "Add DOCKERHUB_REGISTRY global var to prod Jenkins"
[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: 'iec-install-{usecase}-daily-{stream}'
132             current-parameters: false
133             same-node: true
134             block: true
135
136 - job-template:
137     name: 'iec-deploy-{deploy-type}-daily-{stream}'
138     concurrent: true
139     node: '{slave-label}'
140     properties:
141       - throttle:
142           enabled: true
143           max-total: 4
144           max-per-node: 1
145           option: 'project'
146       - build-blocker:
147           use-build-blocker: true
148           blocking-jobs:
149             - '.*-deploy-{deploy-type}-daily-*'
150           blocking-level: 'NODE'
151
152     parameters:
153       - lf-infra-parameters:
154           project: '{project}'
155           stream: '{stream}'
156           branch: '{branch}'
157       - '{project}-defaults'
158       - string:
159           name: DEPLOY_SCENARIO
160           default: '{scenario}'
161
162     wrappers:
163       - build-name:
164           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
165
166     scm: &scm
167       - git:
168           credentials-id: '{jenkins-ssh-credential}'
169           url: '{git-url}/{project}.git'
170           refspec: ''
171           branches:
172             - 'refs/heads/{branch}'
173           skip-tag: true
174           wipe-workspace: true
175           submodule:
176             disable: true
177             recursive: false
178             timeout: '{submodule-timeout}'
179           choosing-strategy: default
180
181     builders:
182       - description-setter:
183           description: "POD: $NODE_NAME"
184       - conditional-step:
185           condition-kind: regex-match
186           regex: 'compass-.*'
187           label: '{deploy-type}'
188           steps:
189             - shell:
190                 !include-raw-escape: ./iec-compass-build.sh
191             - shell:
192                 !include-raw-escape: ./iec-compass-deploy.sh
193             - shell:
194                 !include-raw-escape: ./iec-compass-destroy.sh
195       - conditional-step:
196           condition-kind: regex-match
197           regex: 'fuel-.*'
198           label: '{deploy-type}'
199           steps:
200             - shell:
201                 !include-raw-escape: ./iec-fuel-deploy.sh
202
203     publishers:
204       - email:
205           recipients: armband@enea.com
206       - lf-infra-publish
207
208 - job-template:
209     name: 'iec-install-{usecase}-{deploy-type}-daily-{stream}'
210     concurrent: true
211     node: '{slave-label}'
212     properties:
213       - throttle:
214           enabled: true
215           max-total: 4
216           max-per-node: 1
217           option: 'project'
218       - build-blocker:
219           use-build-blocker: true
220           blocking-jobs:
221             - '.*-deploy-{deploy-type}-daily-*'
222             - '.*-install-{usecase}-{deploy-type}-daily-*'
223           blocking-level: 'NODE'
224
225     parameters:
226       - lf-infra-parameters:
227           project: '{project}'
228           stream: '{stream}'
229           branch: '{branch}'
230       - '{project}-defaults'
231       - '{usecase}-defaults'
232
233     wrappers:
234       - build-name:
235           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${deploy-type}'
236
237     scm: *scm
238
239     builders:
240       - shell:
241           !include-raw-escape: ./iec-{usecase}.sh
242
243     publishers:
244       - email:
245           recipients: armband@enea.com
246       - lf-infra-publish
247
248 ########################
249 # trigger macros
250 ########################
251 # CI PODs
252 # ----------------------------------------------------------------
253 # Akraino IEC CI Baremetal Triggers running against master branch
254 # ----------------------------------------------------------------
255 - trigger:
256     name: 'iec-fuel-virtual-daily-master-trigger'
257     triggers:
258       - timed: '0 1 * * *'
259 - trigger:
260     name: 'iec-fuel-baremetal-daily-master-trigger'
261     triggers:
262       - timed: ''
263 - trigger:
264     name: 'iec-compass-virtual-daily-master-trigger'
265     triggers:
266       - timed: '0 13 * * *'