-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
41 lines (38 loc) · 1.53 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
stages:
- build
variables:
# When using dind service we need to 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.
#
# 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
#
# Note that if you're using Kubernetes executor, the variable should be set to
# tcp://localhost:2375 because of how Kubernetes executor connects services
# to the job container
DOCKER_HOST: tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:dind
build testing:
image: docker:stable-dind
stage: build
only:
- dev
- docker
script:
- echo "$CI_JOB_TOKEN" | docker login registry.git.rwth-aachen.de --username gitlab-ci-token --password-stdin
- docker build -t registry.git.rwth-aachen.de/achinrichs/latex-templates:testing ./docker/testing/
- docker push registry.git.rwth-aachen.de/achinrichs/latex-templates:testing
build latest:
image: docker:stable-dind
stage: build
only:
- master
script:
- echo "$CI_JOB_TOKEN" | docker login registry.git.rwth-aachen.de --username gitlab-ci-token --password-stdin
- docker build -t registry.git.rwth-aachen.de/achinrichs/latex-templates:latest ./docker/latest/
- docker push registry.git.rwth-aachen.de/achinrichs/latex-templates:latest