-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
71 lines (65 loc) · 1.45 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
stages:
- lint
- build
- deploy
lint_frontend:
stage: lint
except:
- feat/cd
image: node
script:
- cd frontend
- npm install
- npm run lint
lint_backend:
stage: lint
except:
- feat/cd
image: registry.gitlab.com/pipeline-components/black:latest
script:
- black --check --verbose -- .
build:
stage: build
only:
- main
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
parallel:
matrix:
- COMPONENT: [frontend, backend]
script:
- docker build -t $CI_REGISTRY/sbibauw/languagelab:$COMPONENT $COMPONENT
- docker push $CI_REGISTRY/sbibauw/languagelab:$COMPONENT
docker_deploy:
stage: deploy
only:
- main
image: alpine:latest
script:
- echo "/mnt/data/languagelab/repo/scripts/update.sh" > /mnt/pipeline
build-dev:
stage: build
only:
- dev
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
parallel:
matrix:
- COMPONENT: [frontend, backend]
script:
- docker build -t $CI_REGISTRY/sbibauw/languagelab:${COMPONENT}-dev $COMPONENT
- docker push $CI_REGISTRY/sbibauw/languagelab:${COMPONENT}-dev
docker_deploy-dev:
stage: deploy
only:
- dev
- feat/cd
image: alpine:latest
script:
- echo "/mnt/data/languagelab/repo/scripts/update.dev.sh" > /mnt/pipeline