.gitlab-ci.yml 23.6 KB
Newer Older
Alicja Reniewicz's avatar
Alicja Reniewicz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
variables:
  DOCKER_PUSH: "false"
  LOCAL_REPO: "127.0.0.1:5000"
  DOCKER_REPO: "gitlab.ow2.org:4567"
  MAVEN_IMAGE: "maven:3.5.2-jdk-8"
  DOCKER_DIND_IMAGE: "docker:19.03.1"
  DOCKER_DIND_SERVICE: "$DOCKER_DIND_IMAGE-dind"
  DOCKER_DRIVER: overlay
  DOCKER_TLS_CERTDIR: "/certs"
  
  MAVEN_OPTS: "-Xmx2048m -Xms2048m"
  SKIP_TESTS: "true"

  DOCKER_CLI: "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $CI_PROJECT_DIR/maven_repo:/root/.m2 -w /usr/src/mymaven -v $CI_PROJECT_DIR:/usr/src/mymaven --env-file .env.list $MAVEN_IMAGE"
  MELODIC_UPPERWARE_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f pom.xml"
  UPPERWARE_METAMODEL_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f upperware_metamodel/pom.xml"
  JWT_COMMONS_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f jwt-commons/pom.xml"
  MELODIC_COMMONS_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f melodic-commons/pom.xml"
  MELODIC_CACHE_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f melodic-cache/pom.xml"

  DLMS_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f dlms/pom.xml"
  DLMS_UTILITY_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f dlms/DLMSUtility/pom.xml"
  DLMS_CONTROLLER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f dlms/DLMSController/pom.xml"
  DLMS_WEB_SERVICE_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f dlms/DLMSWebService/pom.xml"

  PENALTY_CALCULATOR_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f penalty-calculator/pom.xml"
  JWT_SERVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f jwt-server/pom.xml"
  UTILITY_GENERATOR_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f utility-generator/pom.xml"
29
30
31

  ZPP_SOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f zpp-solver/pom.xml"

Alicja Reniewicz's avatar
Alicja Reniewicz committed
32
33
  ADAPTER_SERVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f adapter/pom.xml"
  CP_GENERATOR_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f cp_generator/pom.xml"
34

mriedl's avatar
mriedl committed
35
  CP_PARSER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f zpp-solver/cp-parser/pom.xml"
Alicja Reniewicz's avatar
Alicja Reniewicz committed
36
  CP_SOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f cp-solver/pom.xml"
37
38
39
  GEN_SOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f zpp-solver/genetic-solver/pom.xml"
  NC_SOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f zpp-solver/node-candidates-solver/pom.xml"
  PT_SOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f zpp-solver/pt-solver/pom.xml"
40
  MCTS_SOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f zpp-solver/mcts-solver/pom.xml"
41

Alicja Reniewicz's avatar
Alicja Reniewicz committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  DLMS_AGENT_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -f dlmsAgent/pom.xml"

  EMS_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/pom.xml"
  EMS_UTIL_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/util/pom.xml"
  EMS_BROKER_CLIENT_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/broker-client/pom.xml"
  EMS_BROKER_CEP_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/broker-cep/pom.xml"
  EMS_BAGUETTE_CLIENT_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/baguette-client/pom.xml"
  EMS_BAGUETTE_CLIENT_INSTALL_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/baguette-client-install/pom.xml"
  EMS_BAGUETTE_SERVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/baguette-server/pom.xml"
  EMS_TRANSLATOR_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/translator/pom.xml"
  EMS_SERVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f event-management/control-service/pom.xml"

  METASOLVER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f meta_solver/pom.xml"
  MQ_ADAPTER_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f mq-http-adapter/pom.xml"
  GUI_BACKEND_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f gui-backend/pom.xml"
Maria C's avatar
Maria C committed
57
58
59

  FUNCTIONIZER_TESTING_TOOL_CLI: "mvn --batch-mode -N -Dmaven.test.skip=$SKIP_TESTS -Ddocker.push=false -f functionizer-testing-tool/pom.xml"

Alicja Reniewicz's avatar
Alicja Reniewicz committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
cache:
  paths:
    - maven_repo/

before_script:
  - mkdir -p $HOME/.m2
  - echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                            https://maven.apache.org/xsd/settings-1.0.0.xsd">
                <localRepository>'$CI_PROJECT_DIR'/maven_repo</localRepository>
          </settings>' > $HOME/.m2/settings.xml
  - echo "MAVEN_OPTS=$MAVEN_OPTS" > $CI_PROJECT_DIR/.env.list

after_script:
  - echo '=========================================================================='
  - docker image ls
  - echo '=========================================================================='

Alicja Reniewicz's avatar
Alicja Reniewicz committed
79
80
81
82
83
stages:
  - build-basic-dependencies
  - build-required-part1
  - build-required-part2
  - build-required-part3
Alicja Reniewicz's avatar
Alicja Reniewicz committed
84
  - build-required-part4
Alicja Reniewicz's avatar
Alicja Reniewicz committed
85
86
87
88
89
  - build
  - deploy

build-basic-dependencies:melodic-upperware:
  stage: build-basic-dependencies
Alicja Reniewicz's avatar
Alicja Reniewicz committed
90
91
92
93
  image: $MAVEN_IMAGE
  script:
    - $MELODIC_UPPERWARE_CLI -Pwithout-docker clean install
  artifacts:
94
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
95
96
    - $CI_PROJECT_DIR/upperware/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
97
98
build-required-part1:upperware-metamodel:
  stage: build-required-part1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
99
100
101
102
  image: $MAVEN_IMAGE
  script:
    - $UPPERWARE_METAMODEL_CLI -Pwithout-docker clean install
  artifacts:
103
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
104
105
    - $CI_PROJECT_DIR/upperware_metamodel/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
106
107
build-required-part2:jwt-commons:
  stage: build-required-part2
Alicja Reniewicz's avatar
Alicja Reniewicz committed
108
109
110
111
  image: $MAVEN_IMAGE
  script:
    - $JWT_COMMONS_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
112
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
113
114
    - $CI_PROJECT_DIR/jwt-commons/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
115
116
build-required-part2:melodic-commons:
  stage: build-required-part2
Alicja Reniewicz's avatar
Alicja Reniewicz committed
117
118
119
120
  image: $MAVEN_IMAGE
  script:
    - $MELODIC_COMMONS_CLI -Pwithout-docker clean install
  artifacts:
121
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
122
123
    - $CI_PROJECT_DIR/melodic-commons/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
124
125
build-required-part3:zpp-solver:
  stage: build-required-part3
126
127
  image: $MAVEN_IMAGE
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
128
    - $ZPP_SOLVER_CLI -Pwithout-docker clean install
129
  artifacts:
130
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
131
      - $CI_PROJECT_DIR/zpp-solver/target
132

Alicja Reniewicz's avatar
Alicja Reniewicz committed
133
134
build-required-part3:dlms:
  stage: build-required-part3
135
136
137
138
  image: $MAVEN_IMAGE
  script:
    - $DLMS_CLI -Pwithout-docker clean install
  artifacts:
139
140
    paths:
      - $CI_PROJECT_DIR/dlms/target
141

Alicja Reniewicz's avatar
Alicja Reniewicz committed
142
143
build-required-part4:dlms-utility:
  stage: build-required-part4
144
145
146
147
  image: $MAVEN_IMAGE
  script:
    - $DLMS_UTILITY_CLI -Pwithout-docker clean install
  artifacts:
148
149
150
    paths:
      - $CI_PROJECT_DIR/dlms/DLMSUtility/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
151
152
153
154
155
156
157
158
159
build-required-part4:cp-solver:
  stage: build-required-part4
  image: $MAVEN_IMAGE
  script:
    - $CP_SOLVER_CLI -Pwithout-docker clean install
  artifacts:
    paths:
      - $CI_PROJECT_DIR/cp-solver/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
160
161
build-required-part3:penalty-calculator:
  stage: build-required-part3
162
163
  image: $MAVEN_IMAGE
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
164
    - $PENALTY_CALCULATOR_CLI -Pwithout-docker clean install
165
166
  artifacts:
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
167
    - $CI_PROJECT_DIR/penalty-calculator/target
168

Alicja Reniewicz's avatar
Alicja Reniewicz committed
169
170
build-required-part3:utility-generator:
  stage: build-required-part3
171
172
  image: $MAVEN_IMAGE
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
173
    - $UTILITY_GENERATOR_CLI -Pwithout-docker clean install
174
  artifacts:
175
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
176
    - $CI_PROJECT_DIR/utility-generator/target
177

Alicja Reniewicz's avatar
Alicja Reniewicz committed
178
179
build-required-part3:ems:
  stage: build-required-part3
180
181
  image: $MAVEN_IMAGE
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
182
    - $EMS_CLI -Pwithout-docker clean install
183
  artifacts:
184
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
185
      - $CI_PROJECT_DIR/event-management/target
186

Alicja Reniewicz's avatar
Alicja Reniewicz committed
187
build:melodic-cache:
188
189
190
  stage: build
  image: $MAVEN_IMAGE
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
191
    - $MELODIC_CACHE_CLI -Pwithout-docker clean install
192
  artifacts:
193
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
194
      - $CI_PROJECT_DIR/melodic-cache/target
195

Alicja Reniewicz's avatar
Alicja Reniewicz committed
196
build:dlms-agent:
197
198
199
  stage: build
  image: $MAVEN_IMAGE
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
200
    - $DLMS_AGENT_CLI -Pwithout-docker clean install
201
  artifacts:
202
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
203
      - $CI_PROJECT_DIR/dlmsAgent/target
204

Alicja Reniewicz's avatar
Alicja Reniewicz committed
205
206
207
208
209
build:cp-parser:
  stage: build
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
Alicja Reniewicz's avatar
Alicja Reniewicz committed
210
211
  dependencies:
    - build-required-part4:cp-solver
Alicja Reniewicz's avatar
Alicja Reniewicz committed
212
213
  script:
    - $DOCKER_CLI $CP_PARSER_CLI -Pwithout-docker clean install
Alicja Reniewicz's avatar
Alicja Reniewicz committed
214

Alicja Reniewicz's avatar
Alicja Reniewicz committed
215
216
build-required-part4:ems-util:
  stage: build-required-part4
Alicja Reniewicz's avatar
Alicja Reniewicz committed
217
218
219
220
  image: $MAVEN_IMAGE
  script:
    - $EMS_UTIL_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
221
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
222
223
224
225
226
    - $CI_PROJECT_DIR/event-management/util/target

build:ems-broker-client:
  stage: build
  image: $MAVEN_IMAGE
Alicja Reniewicz's avatar
Alicja Reniewicz committed
227
228
  dependencies:
    - build-required-part4:ems-util
Alicja Reniewicz's avatar
Alicja Reniewicz committed
229
230
231
  script:
    - $EMS_BROKER_CLIENT_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
232
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
233
234
235
236
237
238
239
240
    - $CI_PROJECT_DIR/event-management/broker-client/target

build:ems-broker-cep:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_BROKER_CEP_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
241
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
242
243
244
245
246
247
248
    - $CI_PROJECT_DIR/event-management/broker-cep/target

build:ems-baguette-client:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_BAGUETTE_CLIENT_CLI -Pwithout-docker clean install
249

Alicja Reniewicz's avatar
Alicja Reniewicz committed
250
251
252
253
254
255
build:ems-baguette-server:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_BAGUETTE_SERVER_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
256
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
257
258
259
260
261
262
263
264
    - $CI_PROJECT_DIR/event-management/baguette-server/target

build:ems-baguette-client-install:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_BAGUETTE_CLIENT_INSTALL_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
265
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
266
267
268
269
270
271
272
273
    - $CI_PROJECT_DIR/event-management/baguette-client-install/target

build:ems-translator:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_TRANSLATOR_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
274
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
275
276
    - $CI_PROJECT_DIR/event-management/translator/target

277
278
279
280
281
282
283
284
285
build:ems-server:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_SERVER_CLI -Pwithout-docker clean install
  artifacts:
    paths:
    - $CI_PROJECT_DIR/event-management/control-service/target

Alicja Reniewicz's avatar
Alicja Reniewicz committed
286
287
deploy:melodic-upperware:
  stage: deploy
288
  only:
289
290
291
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
292
293
294
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
295
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
296
    - build-basic-dependencies:melodic-upperware
Alicja Reniewicz's avatar
Alicja Reniewicz committed
297
298
299
300
301
  script:
    - $DOCKER_CLI $MELODIC_UPPERWARE_CLI deploy

deploy:upperware-metamodel:
  stage: deploy
302
  only:
303
304
305
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
306
307
308
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
309
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
310
    - build-required-part1:upperware-metamodel
Alicja Reniewicz's avatar
Alicja Reniewicz committed
311
312
313
314
315
  script:
    - $DOCKER_CLI $UPPERWARE_METAMODEL_CLI deploy

deploy:jwt-commons:
  stage: deploy
mriedl's avatar
mriedl committed
316
  only:
317
318
319
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
320
321
322
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
323
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
324
    - build-required-part2:jwt-commons
Alicja Reniewicz's avatar
Alicja Reniewicz committed
325
326
327
328
329
  script:
    - $DOCKER_CLI $JWT_COMMONS_CLI deploy

deploy:melodic-commons:
  stage: deploy
330
  only:
331
332
333
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
334
335
336
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
337
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
338
    - build-required-part2:melodic-commons
Alicja Reniewicz's avatar
Alicja Reniewicz committed
339
340
341
  script:
    - $DOCKER_CLI $MELODIC_COMMONS_CLI deploy

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
deploy:melodic-cache:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
    - build:melodic-cache
  script:
    - $DOCKER_CLI $MELODIC_CACHE_CLI deploy

deploy:dlms:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
366
    - build-required-part3:dlms
367
368
369
370
371
372
373
374
375
376
377
378
379
  script:
    - $DOCKER_CLI $DLMS_CLI deploy

deploy:dlms-utility:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
380
    - build-required-part4:dlms-utility
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
  script:
    - $DOCKER_CLI $DLMS_UTILITY_CLI deploy

deploy:dlms-controller:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $DLMS_CONTROLLER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/dlms-controller:unknown $CI_REGISTRY_IMAGE/dlms-controller:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/dlms-controller:$CI_COMMIT_BRANCH

deploy:dlms-webservice:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $DLMS_WEB_SERVICE_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/dlms-webservice:unknown $CI_REGISTRY_IMAGE/dlms-webservice:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/dlms-webservice:$CI_COMMIT_BRANCH

deploy:penalty-calculator:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
424
    - build-required-part3:penalty-calculator
425
426
  script:
    - $DOCKER_CLI $PENALTY_CALCULATOR_CLI deploy
Alicja Reniewicz's avatar
Alicja Reniewicz committed
427
428
429

deploy:jwt-server:
  stage: deploy
mriedl's avatar
mriedl committed
430
  only:
431
432
433
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
434
435
436
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
437
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
438
439
    - $DOCKER_CLI $JWT_SERVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
Alicja Reniewicz's avatar
Alicja Reniewicz committed
440
    - docker tag $LOCAL_REPO/melodic/jwtserver:unknown $CI_REGISTRY_IMAGE/jwt-server:$CI_COMMIT_BRANCH
Alicja Reniewicz's avatar
Alicja Reniewicz committed
441
442
    - docker push $CI_REGISTRY_IMAGE/jwt-server:$CI_COMMIT_BRANCH

443
444
445
446
447
448
449
450
451
452
deploy:utility-generator:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
453
    - build-required-part3:utility-generator
454
455
456
457
458
459
460
461
462
463
464
465
466
  script:
    - $DOCKER_CLI $UTILITY_GENERATOR_CLI deploy

deploy:zpp-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
467
    - build-required-part3:zpp-solver
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
  script:
    - $DOCKER_CLI $ZPP_SOLVER_CLI deploy

deploy:adapter:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $ADAPTER_SERVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/adapter:unknown $CI_REGISTRY_IMAGE/adapter:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/adapter:$CI_COMMIT_BRANCH

deploy:cp-generator:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $CP_GENERATOR_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/generator:unknown $CI_REGISTRY_IMAGE/generator:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/generator:$CI_COMMIT_BRANCH

deploy:cp-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $CP_SOLVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/cpsolver:unknown $CI_REGISTRY_IMAGE/cpsolver:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/cpsolver:$CI_COMMIT_BRANCH
515
    - $DOCKER_CLI $CP_SOLVER_CLI deploy
516

517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
deploy:dlms-agent:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: "python:latest"
  before_script:
    - pip install awscli
  dependencies:
    - build:dlms-agent
  script:
    - export AWS_ACCESS_KEY_ID=$K8S_SECRET_AWS_USER
    - export AWS_SECRET_ACCESS_KEY=$K8S_SECRET_AWS_PASSWORD
    - export AWS_DEFAULT_REGION=eu-west-1
    - ls -l $CI_PROJECT_DIR/dlmsAgent
    - ls -l $CI_PROJECT_DIR/dlmsAgent/target
    - aws s3 cp $CI_PROJECT_DIR/dlmsAgent/target/DLMSAgent-3.1.0-SNAPSHOT.jar s3://melodic.testing.data/ARTIFACTS/ow2/dlmsagent/

Alicja Reniewicz's avatar
Alicja Reniewicz committed
536
537
deploy:ems:
  stage: deploy
mriedl's avatar
mriedl committed
538
  only:
539
540
541
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
542
543
544
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
545
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
546
    - build-required-part3:ems
Alicja Reniewicz's avatar
Alicja Reniewicz committed
547
548
549
550
551
  script:
    - $DOCKER_CLI $EMS_CLI deploy

deploy:ems-util:
  stage: deploy
mriedl's avatar
mriedl committed
552
  only:
553
554
555
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
556
557
558
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
559
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
560
    - build-required-part4:ems-util
Alicja Reniewicz's avatar
Alicja Reniewicz committed
561
562
563
564
565
  script:
    - $DOCKER_CLI $EMS_UTIL_CLI deploy

deploy:ems-broker-client:
  stage: deploy
mriedl's avatar
mriedl committed
566
  only:
567
568
569
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
570
571
572
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
573
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
574
575
576
577
578
579
    - build:ems-broker-client
  script:
    - $DOCKER_CLI $EMS_BROKER_CLIENT_CLI deploy

deploy:ems-broker-cep:
  stage: deploy
mriedl's avatar
mriedl committed
580
  only:
581
582
583
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
584
585
586
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
587
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
588
589
590
591
592
593
    - build:ems-broker-cep
  script:
    - $DOCKER_CLI $EMS_BROKER_CEP_CLI deploy

deploy:ems-baguette-client:
  stage: deploy
mriedl's avatar
mriedl committed
594
  only:
595
596
597
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
598
599
600
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
601
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
602
603
604
605
606
607
    - build:ems-baguette-client
  script:
    - $DOCKER_CLI $EMS_BAGUETTE_CLIENT_CLI deploy

deploy:ems-baguette-server:
  stage: deploy
mriedl's avatar
mriedl committed
608
  only:
609
610
611
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
612
613
614
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
615
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
616
617
618
619
620
621
    - build:ems-baguette-server
  script:
    - $DOCKER_CLI $EMS_BAGUETTE_SERVER_CLI deploy

deploy:ems-baguette-client-install:
  stage: deploy
mriedl's avatar
mriedl committed
622
  only:
623
624
625
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
626
627
628
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
629
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
630
631
632
633
634
635
    - build:ems-baguette-client-install
  script:
    - $DOCKER_CLI $EMS_BAGUETTE_CLIENT_INSTALL_CLI deploy

deploy:ems-translator:
  stage: deploy
mriedl's avatar
mriedl committed
636
  only:
637
638
639
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
640
641
642
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
643
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
644
645
646
647
648
649
    - build:ems-translator
  script:
    - $DOCKER_CLI $EMS_TRANSLATOR_CLI deploy

deploy:ems-server:
  stage: deploy
mriedl's avatar
mriedl committed
650
  only:
651
652
653
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
654
655
656
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
657
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
658
659
    - $DOCKER_CLI $EMS_SERVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
660
    - docker tag $LOCAL_REPO/melodic/ems-server:UNKNOWN $CI_REGISTRY_IMAGE/ems-server:$CI_COMMIT_BRANCH
Alicja Reniewicz's avatar
Alicja Reniewicz committed
661
    - docker push $CI_REGISTRY_IMAGE/ems-server:$CI_COMMIT_BRANCH
662

663
664
665
666
667
668
669
670
671
672
deploy:cp-parser:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
673
    - build:cp-parser
674
675
  script:
    - $DOCKER_CLI $CP_PARSER_CLI -Ddocker.imagePrefix=melodic/ clean install
mriedl's avatar
mriedl committed
676

677
678
679
680
681
682
683
684
685
686
deploy:gen-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
687
    - build-required-part4:cp-solver
Alicja Reniewicz's avatar
Alicja Reniewicz committed
688
    - build:cp-parser
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
  script:
    - $DOCKER_CLI $GEN_SOLVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/geneticsolver:unknown $CI_REGISTRY_IMAGE/geneticsolver:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/geneticsolver:$CI_COMMIT_BRANCH

deploy:metasolver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $METASOLVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/metasolver:unknown $CI_REGISTRY_IMAGE/metasolver:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/metasolver:$CI_COMMIT_BRANCH

deploy:mq-adapter:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $MQ_ADAPTER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/mq-http-adapter:unknown $CI_REGISTRY_IMAGE/mq-http-adapter:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/mq-http-adapter:$CI_COMMIT_BRANCH

deploy:nc-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
735
    - build-required-part4:cp-solver
Alicja Reniewicz's avatar
Alicja Reniewicz committed
736
    - build:cp-parser
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
  script:
    - $DOCKER_CLI $NC_SOLVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/ncsolver:unknown $CI_REGISTRY_IMAGE/ncsolver:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/ncsolver:$CI_COMMIT_BRANCH

deploy:pt-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
753
    - build-required-part4:cp-solver
Alicja Reniewicz's avatar
Alicja Reniewicz committed
754
    - build:cp-parser
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
  script:
    - $DOCKER_CLI $PT_SOLVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/ptsolver:unknown $CI_REGISTRY_IMAGE/ptsolver:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/ptsolver:$CI_COMMIT_BRANCH

deploy:mcts-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
771
    - build-required-part4:cp-solver
Alicja Reniewicz's avatar
Alicja Reniewicz committed
772
    - build:cp-parser
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
  script:
    - $DOCKER_CLI $MCTS_SOLVER_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/mctssolver:unknown $CI_REGISTRY_IMAGE/mctssolver:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/mctssolver:$CI_COMMIT_BRANCH

deploy:gui-backend:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $GUI_BACKEND_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/gui-backend:unknown $CI_REGISTRY_IMAGE/gui-backend:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/gui-backend:$CI_COMMIT_BRANCH

deploy:functionizer-testing-tool:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  script:
    - $DOCKER_CLI $FUNCTIONIZER_TESTING_TOOL_CLI -Ddocker.imagePrefix=melodic/ clean install
    - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
    - docker tag $LOCAL_REPO/melodic/functionizer-testing-tool:unknown $CI_REGISTRY_IMAGE/functionizer-testing-tool:$CI_COMMIT_BRANCH
    - docker push $CI_REGISTRY_IMAGE/functionizer-testing-tool:$CI_COMMIT_BRANCH