-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
85 lines (79 loc) · 1.84 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
85 lines (79 loc) · 1.84 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
stages:
- test
- integration
- e2e
- package
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
DOCKER_HOST: "tcp://docker:2375"
DOCKER_TLS_CERTDIR: ""
TESTCONTAINERS_RYUK_DISABLED: "true"
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .m2/repository
unit_tests:
stage: test
image: maven:3.9.11-eclipse-temurin-21
script:
- mvn $MAVEN_OPTS test
artifacts:
when: always
reports:
junit:
- target/surefire-reports/TEST-*.xml
paths:
- target/surefire-reports/
integration_tests:
stage: integration
image: maven:3.9.11-eclipse-temurin-21
services:
- name: docker:27-dind
alias: docker
command: ["--tls=false"]
script:
- mvn $MAVEN_OPTS verify
artifacts:
when: always
reports:
junit:
- target/surefire-reports/TEST-*.xml
- target/failsafe-reports/TEST-*.xml
paths:
- target/surefire-reports/
- target/failsafe-reports/
robot_e2e:
stage: e2e
image: docker:27-cli
services:
- name: docker:27-dind
alias: docker
command: ["--tls=false"]
before_script:
- apk add --no-cache bash curl openjdk21 maven
script:
- ./scripts/stack-up.sh
- docker compose --profile test run --rm robot-tests
after_script:
- docker compose logs api worker postgres rabbitmq > docker-compose-e2e.log || true
- docker compose down -v || true
artifacts:
when: always
paths:
- robot-results/
- docker-compose-e2e.log
package_image:
stage: package
image: docker:27-cli
services:
- name: docker:27-dind
alias: docker
command: ["--tls=false"]
before_script:
- apk add --no-cache bash openjdk21 maven
script:
- mvn $MAVEN_OPTS -DskipTests package
- docker build -t distributed-task-processor:$CI_COMMIT_SHORT_SHA .
artifacts:
paths:
- target/*.jar