-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
39 lines (37 loc) · 1.09 KB
/
.gitlab-ci.yml
File metadata and controls
39 lines (37 loc) · 1.09 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
stages:
- build
build-with-test-containers:
stage: build
image: amazoncorretto:17.0.18-alpine
services:
- name: docker:dind
alias: docker
# explicitly disable tls to avoid docker startup interruption
command: ["--tls=false"]
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
cache:
paths:
- $CI_PROJECT_DIR/.m2/repository
script:
- HOST_IP=$(awk -v h="$HOSTNAME" '$2 == h && $1 ~ /^[0-9.]+$/ {print $1}' /etc/hosts)
- ./mvnw test package jacoco:report -Ptest -Dtest=ContractTestUsingTestContainerTest -Ddocker.host.address=$HOST_IP
artifacts:
paths:
- build/reports/specmatic
build-without-test-containers:
stage: build
image: amazoncorretto:17.0.18-alpine
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
cache:
paths:
- $CI_PROJECT_DIR/.m2/repository
script:
- ./mvnw test package jacoco:report -Ptest -Dtest=ContractTest
artifacts:
paths:
- build/reports/specmatic