-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
52 lines (47 loc) · 1.32 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
variables:
DOCKER_DRIVER: overlay2
stages:
- build
- run
build:
stage: build
tags:
- '210'
variables:
GIT_SUBMODULE_STRATEGY: recursive
rules :
- if: $CI_COMMIT_TAG != null
when: on_success
script:
- echo "Building Auth service image.."
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker compose -f ./app/docker/compose.yml build nvr_auth
- docker push ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG
- echo "Building complete."
deploy_210:
stage: run
variables:
GIT_SUBMODULE_STRATEGY: recursive
image: docker:latest
rules :
- if: $CI_COMMIT_TAG =~ /^v(?:\d+.){2}(?:\d+)$/
when: on_success
tags:
- '210'
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker compose -f ./app/docker/compose.yml up --build --force-recreate -d
deploy_229:
stage: run
variables:
GIT_SUBMODULE_STRATEGY: recursive
rules:
- if: $CI_COMMIT_TAG =~ /^v(?:\d+.){2}(?:\d+)-release$/
tags:
- '229'
image: docker:27.0.3
script:
- echo "Running AIoS NVR Auth service.."
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker compose -f ./app/docker/compose.yml up --force-recreate -d
- echo "Done!"