forked from eficode-academy/war-ci-servers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
57 lines (57 loc) · 1.33 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
image: docker:20
stages:
- test_and_build
- docker_build
- system_test
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
test:
stage: test_and_build
image: docker:19.03.1
services:
- docker:19.03.1-dind
script:
- apk add --no-cache bash
- bash ci/unit-test-app.sh
build:
stage: test_and_build
services:
- docker:20-dind
script:
- apk add --no-cache bash
- chmod +x ci/build-app.sh && ci/build-app.sh
- ls app/build/libs
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- ./ci
- ./app/build/libs
docker_build:
image: docker:19.03.1
stage: docker_build
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- .
policy: pull
services:
- docker:19.03.1-dind
script:
- apk add --no-cache bash
- ls app/build/libs
- bash ci/lint-dockerfile.sh
- export GIT_COMMIT="GL-$CI_COMMIT_SHA" && bash ci/build-docker.sh
- export GIT_COMMIT="GL-$CI_COMMIT_SHA" && bash ci/push-docker.sh
system_test:
image: docker/compose
stage: system_test
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- .
services:
- docker:19.03.1-dind
script:
- apk add --no-cache bash
- export GIT_COMMIT="GL-$CI_COMMIT_SHA" && bash ci/component-test.sh
- export GIT_COMMIT="GL-$CI_COMMIT_SHA" && bash ci/performance-test.sh