-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
92 lines (83 loc) · 1.75 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
image: maven:3.6.3-jdk-11
stages:
- analysis
- test
- package
- docker
- deploy
cache:
paths:
- ~/.cache/
sonarqube-check:
stage: analysis
script:
- mvn -B -q verify sonar:sonar -Dsonar.qualitygate.wait=true
only:
- master
unit-test:
stage: test
script:
- mvn -B test
artifacts:
reports:
junit:
- target/surefire-reports/TEST-*.xml
- target/failsafe-reports/TEST-*.xml
except:
- merge_requests
- master
integration-test:
stage: test
script:
- mvn -B integration-test
artifacts:
reports:
junit:
- target/surefire-reports/TEST-*.xml
- target/failsafe-reports/TEST-*.xml
only:
- merge_requests
- master
jmeter-test:
stage: test
image:
name: justb4/jmeter:latest
entrypoint: [""]
script:
- mkdir testresults
- /entrypoint.sh -n -t jmeter/rest_api_tests.jmx -l ./testresults.log -e -o ./testresults
artifacts:
paths:
- testresults
package:
stage: package
script:
- mvn deploy -Dmaven.test.skip=true -s ci_settings.xml
artifacts:
paths:
- target/rest-api-0.0.1-SNAPSHOT.jar
only:
- master
docker:
stage: docker
image: docker:stable
only:
- master
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
script:
- echo "Building and uploading Docker image 🐳"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH .
- docker push $CI_REGISTRY/$CI_PROJECT_PATH
deploy:
stage: deploy
trigger: tqs-domus/compose
only:
- master