Revert "CI: Rename global-settings to mvn-glob..."
[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: DEPLOY_SCENARIO={scenario}
47             same-node: true
48             block: true
49       - trigger-builds:
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               PULL=yes
62             block: true
63           - project: !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: !j2: |
81               {%- if deploy_type in ['virtual'] -%}
82               iec-{{ iecType }}-destroy-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }}
83               {%- endif -%}
84             current-parameters: false
85             predefined-parameters: |
86               DEPLOY_SCENARIO={scenario}
87               IEC_TYPE={iecType}
88             same-node: true
89             block: true
90
91 - job-template:
92     id: akraino-iec-deploy
93     name: "iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}"
94     concurrent: true
95     node: "{slave_label}"
96     properties: &properties
97       - throttle:
98           enabled: true
99           max-total: 4
100           max-per-node: 1
101           option: "project"
102       - build-blocker:
103           use-build-blocker: true
104           blocking-jobs:
105             - ".*-{iecType}-deploy-{installer}-{deploy_type}-.*"
106             - ".*-{iecType}-destroy-{installer}-{deploy_type}-.*"
107             - ".*-{iecType}-install-.*-{installer}-{deploy_type}-.*"
108           block-level: "NODE"
109
110     parameters:
111       - lf-infra-parameters:
112           project: "{project}"
113           stream: "{stream}"
114           branch: "{branch}"
115       - "{project}-defaults"
116       - "{installer}-{os}-defaults"
117       - string:
118           name: DEPLOY_SCENARIO
119           default: "{scenario}"
120       - string:
121           name: IEC_TYPE
122           default: "{iecType}"
123       - string:
124           name: EXTRA_ARGS
125           default: "-o {os}"
126
127     wrappers: &wrappers
128       - build-name:
129           name: "$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE"
130
131     scm: &scm
132       - lf-infra-gerrit-scm:
133           jenkins-ssh-credential: "{jenkins-ssh-credential}"
134           git-url: "{git-url}/{project}.git"
135           refspec: "$GERRIT_REFSPEC"
136           branch: "$GERRIT_BRANCH"
137           submodule-recursive: false
138           submodule-timeout: "{submodule-timeout}"
139           submodule-disable: true
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: !include-raw-escape: ../iec/iec-compass-build.sh
151             - shell: !include-raw-escape: ../iec/iec-compass-deploy.sh
152             - shell: !include-raw-escape: ../iec/iec-fdn-install.sh
153       - conditional-step:
154           condition-kind: regex-match
155           regex: "fuel"
156           label: "{installer}"
157           steps:
158             - shell: !include-raw-escape: ../iec/iec-fuel-deploy.sh
159
160     publishers:
161       - iec-default-publisher
162
163 - job-template:
164     id: akraino-iec-destroy
165     name: "iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}"
166     concurrent: true
167     node: "{slave_label}"
168     properties: *properties
169     parameters:
170       - lf-infra-parameters:
171           project: "{project}"
172           stream: "{stream}"
173           branch: "{branch}"
174       - "{project}-defaults"
175       - "{installer}-{os}-defaults"
176       - string:
177           name: DEPLOY_SCENARIO
178           default: "{scenario}"
179       - string:
180           name: IEC_TYPE
181           default: "{iecType}"
182       - string:
183           name: EXTRA_ARGS
184           default: "-EEE -o {os}"
185
186     wrappers: *wrappers
187     scm: *scm
188
189     builders:
190       - description-setter:
191           description: "POD: $NODE_NAME"
192       - shell: !include-raw-escape: ../iec/iec-{installer}-destroy.sh
193
194     publishers:
195       - iec-default-publisher