.gitlab-ci.yml 22.5 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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 '=========================================================================='

build:melodic-upperware:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $MELODIC_UPPERWARE_CLI -Pwithout-docker clean install
  artifacts:
    paths: 
    - $CI_PROJECT_DIR/upperware/target

build:upperware-metamodel:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $UPPERWARE_METAMODEL_CLI -Pwithout-docker clean install
  artifacts:
    paths: 
    - $CI_PROJECT_DIR/upperware_metamodel/target

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

build:melodic-commons:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $MELODIC_COMMONS_CLI -Pwithout-docker clean install
  artifacts:
    paths: 
    - $CI_PROJECT_DIR/melodic-commons/target

115
116
117
118
119
120
build:melodic-cache:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $MELODIC_CACHE_CLI -Pwithout-docker clean install
  artifacts:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
121
122
    paths: 
    - $CI_PROJECT_DIR/melodic-cache/target
123
124
125
126
127
128
129

build:dlms:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $DLMS_CLI -Pwithout-docker clean install
  artifacts:
130
131
    paths:
      - $CI_PROJECT_DIR/dlms/target
132
133
134
135
136
137
138

build:dlms-utility:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $DLMS_UTILITY_CLI -Pwithout-docker clean install
  artifacts:
139
140
141
142
143
144
145
146
147
148
149
    paths:
      - $CI_PROJECT_DIR/dlms/DLMSUtility/target

build:dlms-agent:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $DLMS_AGENT_CLI -Pwithout-docker clean install
  artifacts:
    paths:
      - $CI_PROJECT_DIR/dlmsAgent/target
150
151
152
153
154
155
156

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

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

build:cp-solver:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $CP_SOLVER_CLI -Pwithout-docker clean install
  artifacts:
175
    paths: 
176
    - $CI_PROJECT_DIR/cp-solver/target
177
178
179
180
181
182
183

build:zpp-solver:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $ZPP_SOLVER_CLI -Pwithout-docker clean install
  artifacts:
184
185
    paths: 
    - $CI_PROJECT_DIR/zpp-solver/target
186

Alicja Reniewicz's avatar
Alicja Reniewicz committed
187
188
189
190
191
192
build:ems:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
193
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
194
195
196
197
198
199
200
201
    - $CI_PROJECT_DIR/event-management/target

build:ems-util:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_UTIL_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
202
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
203
204
205
206
207
208
209
210
    - $CI_PROJECT_DIR/event-management/util/target

build:ems-broker-client:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_BROKER_CLIENT_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
211
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
212
213
214
215
216
217
218
219
    - $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
220
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    - $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
  
build:ems-baguette-server:
  stage: build
  image: $MAVEN_IMAGE
  script:
    - $EMS_BAGUETTE_SERVER_CLI -Pwithout-docker clean install
  artifacts:
mriedl's avatar
mriedl committed
235
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
236
237
238
239
240
241
242
243
    - $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
244
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
245
246
247
248
249
250
251
252
    - $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
253
    paths:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
254
255
    - $CI_PROJECT_DIR/event-management/translator/target

256
257
258
259
260
261
262
263
264
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
265
266
deploy:melodic-upperware:
  stage: deploy
267
268
269
270
  only: 
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
271
272
273
274
275
276
277
278
279
280
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies: 
    - build:melodic-upperware
  script:
    - $DOCKER_CLI $MELODIC_UPPERWARE_CLI deploy

deploy:upperware-metamodel:
  stage: deploy
281
282
283
284
  only: 
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
285
286
287
288
289
290
291
292
293
294
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies: 
    - build:upperware-metamodel
  script:
    - $DOCKER_CLI $UPPERWARE_METAMODEL_CLI deploy

deploy:jwt-commons:
  stage: deploy
mriedl's avatar
mriedl committed
295
  only:
296
297
298
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
299
300
301
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
302
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
303
304
305
306
307
308
    - build:jwt-commons
  script:
    - $DOCKER_CLI $JWT_COMMONS_CLI deploy

deploy:melodic-commons:
  stage: deploy
309
310
311
312
  only: 
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
313
314
315
316
317
318
319
320
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies: 
    - build:melodic-commons
  script:
    - $DOCKER_CLI $MELODIC_COMMONS_CLI deploy

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
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
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:
    - build:dlms
  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:
    - build:dlms-utility
  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:
    - build:penalty-calculator
  script:
    - $DOCKER_CLI $PENALTY_CALCULATOR_CLI deploy
Alicja Reniewicz's avatar
Alicja Reniewicz committed
406
407
408

deploy:jwt-server:
  stage: deploy
mriedl's avatar
mriedl committed
409
  only:
410
411
412
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
413
414
415
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
416
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
417
418
    - $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
419
    - docker tag $LOCAL_REPO/melodic/jwtserver:unknown $CI_REGISTRY_IMAGE/jwt-server:$CI_COMMIT_BRANCH
Alicja Reniewicz's avatar
Alicja Reniewicz committed
420
421
    - docker push $CI_REGISTRY_IMAGE/jwt-server:$CI_COMMIT_BRANCH

422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
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
deploy:utility-generator:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
    - build:utility-generator
  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:
    - build:zpp-solver
  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

495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
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
514
515
deploy:ems:
  stage: deploy
mriedl's avatar
mriedl committed
516
  only:
517
518
519
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
520
521
522
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
523
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
524
525
526
527
528
529
    - build:ems
  script:
    - $DOCKER_CLI $EMS_CLI deploy

deploy:ems-util:
  stage: deploy
mriedl's avatar
mriedl committed
530
  only:
531
532
533
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
534
535
536
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
537
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
538
539
540
541
542
543
    - build:ems-util
  script:
    - $DOCKER_CLI $EMS_UTIL_CLI deploy

deploy:ems-broker-client:
  stage: deploy
mriedl's avatar
mriedl committed
544
  only:
545
546
547
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
548
549
550
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
551
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
552
553
554
555
556
557
    - build:ems-broker-client
  script:
    - $DOCKER_CLI $EMS_BROKER_CLIENT_CLI deploy

deploy:ems-broker-cep:
  stage: deploy
mriedl's avatar
mriedl committed
558
  only:
559
560
561
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
562
563
564
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
565
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
566
567
568
569
570
571
    - build:ems-broker-cep
  script:
    - $DOCKER_CLI $EMS_BROKER_CEP_CLI deploy

deploy:ems-baguette-client:
  stage: deploy
mriedl's avatar
mriedl committed
572
  only:
573
574
575
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
576
577
578
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
579
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
580
581
582
583
584
585
    - build:ems-baguette-client
  script:
    - $DOCKER_CLI $EMS_BAGUETTE_CLIENT_CLI deploy

deploy:ems-baguette-server:
  stage: deploy
mriedl's avatar
mriedl committed
586
  only:
587
588
589
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
590
591
592
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
593
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
594
595
596
597
598
599
    - build:ems-baguette-server
  script:
    - $DOCKER_CLI $EMS_BAGUETTE_SERVER_CLI deploy

deploy:ems-baguette-client-install:
  stage: deploy
mriedl's avatar
mriedl committed
600
  only:
601
602
603
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
604
605
606
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
607
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
608
609
610
611
612
613
    - build:ems-baguette-client-install
  script:
    - $DOCKER_CLI $EMS_BAGUETTE_CLIENT_INSTALL_CLI deploy

deploy:ems-translator:
  stage: deploy
mriedl's avatar
mriedl committed
614
  only:
615
616
617
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
618
619
620
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
621
  dependencies:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
622
623
624
625
626
627
    - build:ems-translator
  script:
    - $DOCKER_CLI $EMS_TRANSLATOR_CLI deploy

deploy:ems-server:
  stage: deploy
mriedl's avatar
mriedl committed
628
  only:
629
630
631
    - master
    - rc3.0
    - rc3.1
Alicja Reniewicz's avatar
Alicja Reniewicz committed
632
633
634
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
mriedl's avatar
mriedl committed
635
  script:
Alicja Reniewicz's avatar
Alicja Reniewicz committed
636
637
    - $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
638
    - docker tag $LOCAL_REPO/melodic/ems-server:UNKNOWN $CI_REGISTRY_IMAGE/ems-server:$CI_COMMIT_BRANCH
Alicja Reniewicz's avatar
Alicja Reniewicz committed
639
    - docker push $CI_REGISTRY_IMAGE/ems-server:$CI_COMMIT_BRANCH
640

641
642
643
644
645
646
647
648
649
650
651
652
653
deploy:cp-parser:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
    - build:cp-solver
  script:
    - $DOCKER_CLI $CP_PARSER_CLI -Ddocker.imagePrefix=melodic/ clean install
mriedl's avatar
mriedl committed
654

655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
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
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
deploy:gen-solver:
  stage: deploy
  only:
    - master
    - rc3.0
    - rc3.1
  image: $DOCKER_DIND_IMAGE
  services:
    - $DOCKER_DIND_SERVICE
  dependencies:
    - build:cp-solver
  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:
    - build:cp-solver
  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:
    - build:cp-solver
  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:
    - build:cp-solver
  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