-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
51 lines (43 loc) · 1.35 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
default:
image: maven:latest
variables:
# When you use the dind service, you must instruct Docker to talk with
# the daemon started inside of the service. The daemon is available
# with a network connection instead of the default
# /var/run/docker.sock socket. Docker 19.03 does this automatically
# by setting the DOCKER_HOST in
# https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03/docker-entrypoint.sh#L23-L29
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services.
#
# Specify to Docker where to create the certificates. Docker
# creates them automatically on boot, and creates
# `/certs/client` to share between the service and job
# container, thanks to volume mount from config.toml
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: tcp://localhost:2375/
services:
- docker:19.03.12-dind
stages:
- build
- deploy
build:
stage: build
tags:
- build
script:
- echo 'Pipeline Stage - build'
- mvn clean install -DskipTests
artifacts:
name: "demo-snapshot"
expire_in: 15 min
paths:
- ./target/*.jar
build-docker:
image: docker:19.03.12
stage: deploy
tags:
- docker
script:
- docker build -t com.sngular.kloadgen/demo:0.0.1 .