forked from zhblue/hustoj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
45 lines (40 loc) · 1.14 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
image: docker:latest
stages:
- build
- test
build:
stage: build
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --pull -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
build-web:
stage: build
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --pull --file=docker/web/Dockerfile -t $CI_REGISTRY_IMAGE:web .
- docker push $CI_REGISTRY_IMAGE:web
build-mysql:
stage: build
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --pull --file=docker/mysql/Dockerfile -t $CI_REGISTRY_IMAGE:mysql .
- docker push $CI_REGISTRY_IMAGE:mysql
build-judge:
stage: build
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --pull --file=docker/judge/Dockerfile -t $CI_REGISTRY_IMAGE:judge .
- docker push $CI_REGISTRY_IMAGE:judge