-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
689 lines (634 loc) · 23 KB
/
.gitlab-ci.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
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
---
stages:
- pre-build
- test
- build
- deploy-beta
- deploy-staging
- deploy-production
# The image contains a JDK 17 and a Chrome browser
# Node, NPM and Yarn are installed by Gradle
image: circleci/openjdk:17-buster-browsers
default:
tags:
- openstack
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
GRADLE_USER_HOME: $CI_PROJECT_DIR/.gradle
GIT_LFS_SKIP_SMUDGE: "1"
ELASTIC_VERSION: "7.17.5"
IMAGE_TAG: $CI_COMMIT_REF_SLUG
GIT_DEPTH: 0
# See https://docs.gitlab.com/ee/ci/yaml/workflow.html#workflowrules-templates
include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
build-es-synonyms-docker-image:
# There are three methods to enable the use of docker build and docker run during jobs; each with their own tradeoffs
# (more details here: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html)
# docker-in-docker (dind) approach is used here.
# https://stackoverflow.com/questions/47280922/role-of-docker-in-docker-dind-service-in-gitlab-ci
# The runner should be executed in privileged mode.
# It is recommended to use dind with TLS enabled.
image: registry.forgemia.inra.fr/urgi-is/docker-rare/docker-git:latest
stage: pre-build
services:
- docker:27.1.1-dind
script:
- git lfs pull -I "data/synonyms"
- cd data/synonyms
- gzip -fd all_*.txt.gz
- docker build --build-arg ELASTIC_VERSION=${ELASTIC_VERSION} -t registry.forgemia.inra.fr/urgi-is/data-discovery/elasticsearch-synonyms:${IMAGE_TAG} .
# only build latest tag on master branch
- if [ "master" == "${CI_COMMIT_REF_SLUG}" ] ; then docker build --build-arg ELASTIC_VERSION=${ELASTIC_VERSION} -t registry.forgemia.inra.fr/urgi-is/data-discovery/elasticsearch-synonyms:latest . ; fi;
- docker login registry.forgemia.inra.fr -u $CONTAINER_REGISTRY_USERNAME -p $CONTAINER_REGISTRY_TOKEN
# TODO: remove the old SHA image before pushing the new one? (https://gitlab.com/gitlab-org/gitlab-foss/issues/25322)
- docker push registry.forgemia.inra.fr/urgi-is/data-discovery/elasticsearch-synonyms:${IMAGE_TAG}
# TODO fix above before merging into master branch
- if [ $CI_DEFAULT_BRANCH == "${CI_COMMIT_REF_SLUG}" ] ; then docker push registry.forgemia.inra.fr/urgi-is/data-discovery/elasticsearch-synonyms:latest ; fi;
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
## below is commented since we cannot trigger this job when creating a new merge request (no possibility to distinguish between MR create and MR update at the moment). The IMAGE_TAG tag needs to be pushed for next test-lint-build job succeeds
# changes:
# - data/synonyms/*
build-loader-docker-image:
image: registry.forgemia.inra.fr/urgi-is/docker-rare/docker-git:latest
stage: pre-build
services:
- docker:27.1.1-dind
script:
# build the image
- docker build -t registry.forgemia.inra.fr/urgi-is/docker-rare/data-discovery-loader:${IMAGE_TAG} .
# only build latest tag on master branch
- if [ "master" == "${CI_COMMIT_REF_SLUG}" ] ; then docker build -t registry.forgemia.inra.fr/urgi-is/docker-rare/data-discovery-loader:latest . ; fi;
# Login before pushing the image
- docker login registry.forgemia.inra.fr -u $CONTAINER_REGISTRY_USERNAME -p $CONTAINER_REGISTRY_TOKEN
# push the built image
- docker push registry.forgemia.inra.fr/urgi-is/docker-rare/data-discovery-loader:${IMAGE_TAG}
# only push latest tag on master branch
- if [ $CI_DEFAULT_BRANCH == "${CI_COMMIT_REF_SLUG}" ] ; then docker push registry.forgemia.inra.fr/urgi-is/docker-rare/data-discovery-loader:latest ; fi;
rules: # from my point of view, following rule should not trigger the job (when only commiting .gitlab-ci.yml), but the job is executed currently, why?
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- scripts/*
- backend/src/test/resources/fr/inra/urgi/datadiscovery/dao/*/settings.json
- backend/src/main/resources/fr/inra/urgi/datadiscovery/domain/*/*.mapping.json
- backend/src/main/resources/fr/inra/urgi/datadiscovery/domain/suggestions.mapping.json
- backend/src/test/resources/fr/inra/urgi/datadiscovery/dao/settings-suggestions.json
deploy-synonyms-to-cluster:
image: registry.forgemia.inra.fr/urgi-is/docker-rare/bash-git-lfs:latest
stage: pre-build
script:
- eval $(ssh-agent -s)
- ssh-add <(echo "${ES_SSH_PRIVATE_KEY}")
- git lfs pull -I "data/synonyms"
- for ES_HOST in $ES_HOSTS_OPENSTACK $ES_MASTER_OPENSTACK ; do scp -o StrictHostKeyChecking=no data/synonyms/all_*.gz ${SERVER_USER_ROCKY_OPENSTACK}@${ES_HOST}:/tmp/ ; done ;
- for ES_HOST in $ES_HOSTS_OPENSTACK $ES_MASTER_OPENSTACK ; do ssh -o StrictHostKeyChecking=no ${SERVER_USER_ROCKY_OPENSTACK}@${ES_HOST} "sudo mkdir -p /etc/elasticsearch/analysis/synonyms/ ; gzip -d /tmp/all_*gz ; sudo mv /tmp/all_autophrases.txt /tmp/all_synonyms.txt /etc/elasticsearch/analysis/synonyms/" ; done ;
- eval $(ssh-agent -k)
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- data/synonyms/all_*
# launch all tests and sonarqube analysis
test-lint-build:
stage: test
# the backend tests need an elasticsearch instance
services:
# even if that would be ideal
# we can't just launch the service with just elasticsearch:6.3.1
# because we need to pass some variables, but they are passed to _all_ containers
# so they fail the start of other docker images like urgi/docker-browsers
# the only solution is to override the entrypoint of the service and pass the arguments manually
- name: registry.forgemia.inra.fr/urgi-is/data-discovery/elasticsearch-synonyms:${IMAGE_TAG}
# TODO fix above before merging into master branch
alias: elasticsearch
# discovery.type=single-node
# single-node is necessary to start in development mode
# so there will be no bootstrap checks that would fail on CI
# especially the error regarding
# `max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]`
command:
- /bin/sh
- -c
- "export PATH=/usr/share/elasticsearch/bin:$PATH ;
exec chroot --userspec=1000 / elasticsearch -Ediscovery.type=single-node -Ecluster.name=elasticsearch"
variables:
GRADLE_OPTS: "-Xms512m -Xmx8192m -XX:MaxMetaspaceSize=8192m -Dorg.gradle.daemon=false"
ES_JAVA_OPTS: "-Xms2g -Xmx2g"
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
script:
- ./gradlew --parallel check jacocoTestReport :frontend:lint
# - ./gradlew assemble -Papp=${APP_NAME}
- find /tmp/node/*/bin -name node -exec ln -s {} /tmp/node/node \;
- export PATH="/tmp/node/:$PATH"
# Sonar task disabled until https://sonarsource.atlassian.net/browse/SONARGRADL-133 is fixed
# - ./gradlew sonar -x test # TODO: fix in GNP-6342
# cache:
# #key: "$CI_COMMIT_REF_NAME"
# key: "${CI_JOB_NAME}"
# policy: pull-push
# paths:
# - .gradle
# - .sonar/cache
# - frontend/.gradle/
# - frontend/node_modules/
artifacts:
reports:
junit:
- ./backend/build/test-results/test/TEST-*.xml
- ./frontend/karma-junit-tests-report/TEST*.xml
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
interruptible: true
.build-app: &build_app
# Hidden job which serves as a template for following
# jobs below. See https://docs.gitlab.com/ee/ci/yaml/#anchors
stage: build
tags:
- openstack
script:
- ./gradlew assemble -Papp=${APP_NAME}
artifacts:
paths:
- backend/build/libs/${APP_NAME}.jar
expire_in: 6 months
cache:
key: "${CI_COMMIT_REF_NAME}"
policy: pull-push
paths:
- .gradle
- frontend/.gradle/
- frontend/node_modules/
rules:
- if: $CI_COMMIT_MESSAGE =~ /.*SKIP_DEPLOY.*/i # Ninja Squad should appreciate
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/**/*
- backend/build.gradle.kts
- frontend/**/*
- build.gradle.kts
- docker.env
- .gitlab-ci.yml
allow_failure: false # mandatory to block the execution of the pipeline
interruptible: true
build-rare:
variables:
APP_NAME: "rare"
<<: *build_app # Merge the contents of the 'build_app' alias
build-brc4env:
variables:
APP_NAME: "brc4env"
<<: *build_app # Merge the contents of the 'build_app' alias
build-wheatis:
variables:
APP_NAME: "wheatis"
<<: *build_app # Merge the contents of the 'build_app' alias
build-faidare:
variables:
APP_NAME: "faidare"
<<: *build_app # Merge the contents of the 'build_app' alias
restart-config-server:
stage: build
variables:
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
script:
- eval $(ssh-agent -s)
- ssh-add <(echo "${SSH_PRIVATE_KEY}")
- ssh -o StrictHostKeyChecking=no ${SERVER_USER}@${SERVER_IP} 'echo "Successfully connected on $(hostname)"'
- ssh ${SERVER_USER}@${SERVER_IP} "sudo systemctl restart bootapp@config-server"
- eval $(ssh-agent -k)
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /.*SKIP_DEPLOY.*/i # Ninja Squad should appreciate
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
interruptible: true
.deploy-to-vm: &deploy_to_vm
tags:
- openstack
# Hidden job which serves as template for executed jobs below.
# See https://docs.gitlab.com/ee/ci/yaml/#anchors
retry: 2
script:
# SSH initialization
- eval $(ssh-agent -s)
- ssh-add <(echo "${SSH_PRIVATE_KEY}")
- ssh -o StrictHostKeyChecking=no ${SERVER_USER}@${SERVER_IP} 'echo "Successfully connected on $(hostname)"'
# Copy jar to the server
- scp ./backend/build/libs/${APP_NAME}.jar ${SERVER_USER}@${SERVER_IP}:/tmp/${SERVICE_NAME}-${ENV}.jar
- ssh ${SERVER_USER}@${SERVER_IP} "sudo mv /tmp/${SERVICE_NAME}-${ENV}.jar /opt/bootapp/ ; sudo chown -R bootapp:bootapp /opt/bootapp/ ; sudo systemctl restart bootapp@${SERVICE_NAME}-${ENV}"
- eval $(ssh-agent -k)
- echo "Deploy and index done. Application should be available at http://${SERVER_IP}:${APP_PORT}/${APP_NAME}"
interruptible: true
.variables-rare-beta: &variables-rare-beta
variables:
ENV: beta
APP_NAME: rare
APP_PORT: ${BETA_RARE_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-rare-staging: &variables-rare-staging
variables:
ENV: staging
APP_NAME: rare
APP_PORT: ${STAGING_RARE_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-rare-prod: &variables-rare-prod
variables:
ENV: prod
APP_NAME: rare
APP_PORT: ${PROD_RARE_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-brc4env-beta: &variables-brc4env-beta
variables:
ENV: beta
APP_NAME: brc4env
APP_PORT: ${BETA_BRC4ENV_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-brc4env-staging: &variables-brc4env-staging
variables:
ENV: staging
APP_NAME: brc4env
APP_PORT: ${STAGING_BRC4ENV_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-brc4env-prod: &variables-brc4env-prod
variables:
ENV: prod
APP_NAME: brc4env
APP_PORT: ${PROD_BRC4ENV_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-wheatis-beta: &variables-wheatis-beta
variables:
ENV: beta
APP_NAME: wheatis
APP_PORT: ${BETA_WHEATIS_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-wheatis-staging: &variables-wheatis-staging
variables:
ENV: staging
APP_NAME: wheatis
APP_PORT: ${STAGING_WHEATIS_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-wheatis-prod: &variables-wheatis-prod
variables:
ENV: prod
APP_NAME: wheatis
APP_PORT: ${PROD_WHEATIS_PORT}
SERVICE_NAME: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-faidare-beta: &variables-faidare-beta
variables:
ENV: beta
APP_NAME: faidare
APP_PORT: ${BETA_FAIDARE_PORT}
SERVICE_NAME: ${APP_NAME}-search
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-faidare-staging-public: &variables-faidare-staging-public
variables:
ENV: staging-public
APP_NAME: faidare
APP_PORT: ${STAGING_FAIDARE_PUBLIC_PORT}
SERVICE_NAME: ${APP_NAME}-search
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-faidare-staging-private: &variables-faidare-staging-private
variables:
ENV: staging-private
APP_NAME: faidare
APP_PORT: ${STAGING_FAIDARE_PRIVATE_PORT}
SERVICE_NAME: ${APP_NAME}-search
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-faidare-prod-public: &variables-faidare-prod-public
variables:
ENV: prod-public
APP_NAME: faidare
APP_PORT: ${PROD_FAIDARE_PUBLIC_PORT}
SERVICE_NAME: ${APP_NAME}-search
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
.variables-faidare-prod-private: &variables-faidare-prod-private
variables:
ENV: prod-private
APP_NAME: faidare
APP_PORT: ${PROD_FAIDARE_PRIVATE_PORT}
SERVICE_NAME: ${APP_NAME}-search
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_CENTOS_OPENSTACK}
ES_HOST: ${ES_HOST_OPENSTACK}
ES_HOSTS: ${ES_HOSTS_OPENSTACK}
ES_PORT: ${ES_PORT}
deploy-rare-to-beta:
stage: deploy-beta
tags:
- openstack
<<: *variables-rare-beta
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
allow_failure: false # mandatory to block the execution of the pipeline
needs: [ "restart-config-server","build-rare" ]
deploy-rare-to-staging:
stage: deploy-staging
tags:
- openstack
<<: *variables-rare-staging
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
needs: [ "restart-config-server","build-rare" ]
deploy-rare-to-prod:
stage: deploy-production
tags:
- openstack
<<: *variables-rare-prod
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
allow_failure: false
needs: [ "restart-config-server","build-rare" ]
deploy-brc4env-to-beta:
stage: deploy-beta
tags:
- openstack
<<: *variables-brc4env-beta
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
allow_failure: false # mandatory to block the execution of the pipeline
needs: [ "restart-config-server","build-brc4env" ]
deploy-brc4env-to-staging:
stage: deploy-staging
tags:
- openstack
<<: *variables-brc4env-staging
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
needs: [ "restart-config-server","build-brc4env" ]
deploy-brc4env-to-prod:
stage: deploy-production
tags:
- openstack
<<: *variables-brc4env-prod
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
allow_failure: false
needs: [ "restart-config-server","build-brc4env" ]
deploy-wheatis-to-beta:
stage: deploy-beta
tags:
- openstack
<<: *variables-wheatis-beta
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
allow_failure: false
needs: [ "restart-config-server","build-wheatis" ]
deploy-wheatis-to-staging:
stage: deploy-staging
tags:
- openstack
<<: *variables-wheatis-staging
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
needs: [ "restart-config-server","build-wheatis" ]
deploy-wheatis-to-prod:
stage: deploy-production
tags:
- openstack
<<: *variables-wheatis-prod
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
allow_failure: false
needs: [ "restart-config-server","build-wheatis" ]
deploy-faidare-to-beta:
stage: deploy-beta
<<: *variables-faidare-beta
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
allow_failure: false
needs: [ "restart-config-server","build-faidare" ]
deploy-faidare-to-staging-public:
stage: deploy-staging
<<: *variables-faidare-staging-public
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
needs: [ "restart-config-server","build-faidare" ]
deploy-faidare-to-staging-private:
stage: deploy-staging
<<: *variables-faidare-staging-private
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
needs: [ "restart-config-server","build-faidare" ]
deploy-faidare-to-prod-public:
stage: deploy-production
<<: *variables-faidare-prod-public
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
allow_failure: false
needs: [ "restart-config-server","build-faidare" ]
deploy-faidare-to-prod-private:
stage: deploy-production
<<: *variables-faidare-prod-private
<<: *deploy_to_vm
rules:
- if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i || $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- ./*.md
- backend/src/build.gradle.kts
- backend/src/**/*
- frontend/**/*
- .gitlab-ci.yml
when: manual
allow_failure: false
needs: [ "restart-config-server","build-faidare" ]