-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
73 lines (67 loc) · 2.34 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
stages:
- base
- test
- build
prepare-base-docker:
stage: base
image: docker:stable
when: manual
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker build -f Dockerfile.base -t registry.gitlab.com/tokenmill/crawling-framework/base:latest .
- docker push registry.gitlab.com/tokenmill/crawling-framework/base:latest
- docker rmi registry.gitlab.com/tokenmill/crawling-framework/base:latest
prepare-base-elasticsearch:
stage: base
image: docker:stable
when: manual
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker build -f Dockerfile.es -t registry.gitlab.com/tokenmill/crawling-framework/elasticsearch:latest .
- docker push registry.gitlab.com/tokenmill/crawling-framework/elasticsearch:latest
- docker rmi registry.gitlab.com/tokenmill/crawling-framework/elasticsearch:latest
prepare-administration-ui:
stage: base
image: docker:stable
when: manual
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker build -f Dockerfile.ui -t registry.gitlab.com/tokenmill/crawling-framework/ui:latest .
- docker push registry.gitlab.com/tokenmill/crawling-framework/ui:latest
- docker rmi registry.gitlab.com/tokenmill/crawling-framework/ui:latest
prepare-crawler:
stage: base
image: docker:stable
when: manual
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker build -f Dockerfile.crawler -t registry.gitlab.com/tokenmill/crawling-framework/crawler:latest .
- docker push registry.gitlab.com/tokenmill/crawling-framework/crawler:latest
- docker rmi registry.gitlab.com/tokenmill/crawling-framework/crawler:latest
unit-tests:
stage: test
image: registry.gitlab.com/tokenmill/crawling-framework/base:latest
when: always
script:
- mvn clean test
integration-tests:
stage: test
image: registry.gitlab.com/tokenmill/crawling-framework/base:latest
services:
- name: registry.gitlab.com/tokenmill/crawling-framework/elasticsearch:latest
alias: elasticsearch
when: always
script:
- mvn -Dtest=*TestInt -DfailIfNoTests=false clean test