Merge "iec: exclude seba_on_arm from virtual PODs"
[ci-management.git] / jjb / akraino-templates / akraino-iec-templates.yaml
1 ---
2 - job-template:
3     id: akraino-iec-install
4     name: 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}'
5     disabled: '{obj:disabled}'
6     concurrent: false
7     node: '{slave-label}'
8     properties:
9       - throttle:
10           enabled: true
11           max-total: 4
12           max-per-node: 1
13           option: 'project'
14       - build-blocker:
15           use-build-blocker: true
16           blocking-jobs:
17             - '.*-fuel-{deploy_type}-.*'
18             - '.*-compass-{deploy_type}-.*'
19           block-level: 'NODE'
20
21     wrappers:
22       - build-name:
23           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE'
24
25     triggers:
26       - 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}-trigger'
27
28     parameters:
29       - lf-infra-parameters:
30           project: '{project}'
31           stream: '{stream}'
32           branch: '{branch}'
33       - '{project}-defaults'
34       - '{installer}-{os}-defaults'
35       - string:
36           name: DEPLOY_SCENARIO
37           default: '{scenario}'
38       - string:
39           name: IEC_TYPE
40           default: '{iecType}'
41
42     builders:
43       - trigger-builds:
44           - project: 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
45             current-parameters: true
46             predefined-parameters:
47               DEPLOY_SCENARIO={scenario}
48             same-node: true
49             block: true
50           - project: 'validation-enea-daily-{stream}'
51             same-node: true
52             current-parameters: true
53             predefined-parameters: |
54               CLUSTER_MASTER_IP=$K8S_MASTER_IP
55               CLUSTER_SSH_USER=$K8S_SSH_USER
56               CLUSTER_SSH_PASSWORD=$K8S_SSH_PASSWORD
57               CLUSTER_SSH_KEY=$K8S_SSH_KEY
58               BLUEPRINT={project-name}
59               VERSION=master
60               OPTIONAL=false
61             block: true
62           - project:
63               !j2: |
64                 {%- if deploy_type not in ['virtual'] -%}
65                 {%- for uc in usecase -%}
66                 {%- for ph in phase -%}
67                 iec-{{ iecType }}-{{ ph }}-{{ uc }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }}
68                 {%- if not loop.last -%},{%- endif -%}
69                 {%- endfor %}
70                 {%- if not loop.last -%},{%- endif -%}
71                 {%- endfor %}
72                 {%- endif -%}
73             current-parameters: true
74             same-node: true
75             block: true
76             block-thresholds:
77               build-step-failure-threshold: 'never'
78               failure-threshold: 'never'
79               unstable-threshold: 'FAILURE'
80           - project: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
81             current-parameters: false
82             predefined-parameters: |
83               DEPLOY_SCENARIO={scenario}
84               IEC_TYPE={iecType}
85             same-node: true
86             block: true
87
88 - job-template:
89     id: akraino-iec-deploy
90     name: 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
91     concurrent: true
92     node: '{slave-label}'
93     properties: &properties
94       - throttle:
95           enabled: true
96           max-total: 4
97           max-per-node: 1
98           option: 'project'
99       - build-blocker:
100           use-build-blocker: true
101           blocking-jobs:
102             - '.*-{iecType}-deploy-{installer}-{deploy_type}-.*'
103             - '.*-{iecType}-destroy-{installer}-{deploy_type}-.*'
104             - '.*-{iecType}-install-.*-{installer}-{deploy_type}-.*'
105           block-level: 'NODE'
106
107     parameters:
108       - lf-infra-parameters:
109           project: '{project}'
110           stream: '{stream}'
111           branch: '{branch}'
112       - '{project}-defaults'
113       - '{installer}-{os}-defaults'
114       - string:
115           name: DEPLOY_SCENARIO
116           default: '{scenario}'
117       - string:
118           name: IEC_TYPE
119           default: '{iecType}'
120       - string:
121           name: EXTRA_ARGS
122           default: '-o {os}'
123
124     wrappers: &wrappers
125       - build-name:
126           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE'
127
128     scm: &scm
129       - git:
130           credentials-id: '{jenkins-ssh-credential}'
131           url: '{git-url}/{project}.git'
132           refspec: '$GERRIT_REFSPEC'
133           branches: '$GERRIT_BRANCH'
134           skip-tag: true
135           wipe-workspace: true
136           submodule:
137             disable: true
138             recursive: false
139             timeout: '{submodule-timeout}'
140           choosing-strategy: default
141
142     builders:
143       - description-setter:
144           description: "POD: $NODE_NAME"
145       - conditional-step:
146           condition-kind: regex-match
147           regex: 'compass'
148           label: '{installer}'
149           steps:
150             - shell:
151                 !include-raw-escape: ../iec/iec-compass-build.sh
152             - shell:
153                 !include-raw-escape: ../iec/iec-compass-deploy.sh
154             - shell:
155                 !include-raw-escape: ../iec/iec-fdn-install.sh
156       - conditional-step:
157           condition-kind: regex-match
158           regex: 'fuel'
159           label: '{installer}'
160           steps:
161             - shell:
162                 !include-raw-escape: ../iec/iec-fuel-deploy.sh
163
164     publishers: &publishers
165       - email:
166           recipients: armband@enea.com
167       - lf-infra-publish
168
169 - job-template:
170     id: akraino-iec-destroy
171     name: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
172     concurrent: true
173     node: '{slave-label}'
174     properties: *properties
175     parameters:
176       - lf-infra-parameters:
177           project: '{project}'
178           stream: '{stream}'
179           branch: '{branch}'
180       - '{project}-defaults'
181       - '{installer}-{os}-defaults'
182       - string:
183           name: DEPLOY_SCENARIO
184           default: '{scenario}'
185       - string:
186           name: IEC_TYPE
187           default: '{iecType}'
188       - string:
189           name: EXTRA_ARGS
190           default: '-EEE -o {os}'
191
192     wrappers: *wrappers
193     scm: *scm
194
195     builders:
196       - description-setter:
197           description: "POD: $NODE_NAME"
198       - shell:
199           !include-raw-escape: ../iec/iec-{installer}-destroy.sh
200
201     publishers: *publishers
202
203 - job-template:
204     id: akraino-iec-phase-usecase
205     name: 'iec-{iecType}-{phase}-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
206     concurrent: true
207     node: '{slave-label}'
208     properties: *properties
209
210     parameters:
211       - lf-infra-parameters:
212           project: '{project}'
213           stream: '{stream}'
214           branch: '{branch}'
215       - '{project}-defaults'
216       - '{installer}-{os}-defaults'
217       - '{usecase}-defaults'
218
219     wrappers:
220       - build-name:
221           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${installer}-${deploy_type}'
222
223     scm: *scm
224
225     builders:
226       - shell:
227           !include-raw-escape: ../iec/iec-{usecase}.sh
228
229     publishers: *publishers