Projekt

Obecné

Profil

Stáhnout (1.56 KB) Statistiky
| Větev: | Tag: | Revize:
1
image: docker:latest
2
services:
3
  - docker:dind
4

    
5
stages:
6
  - build
7
  - test
8

    
9
variables:
10
  # When using dind service, we need to instruct docker, to talk with
11
  # the daemon started inside of the service. The daemon is available
12
  # with a network connection instead of the default
13
  # /var/run/docker.sock socket. Docker 19.03 does this automatically
14
  # by setting the DOCKER_HOST in
15
  # https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03/docker-entrypoint.sh#L23-L29
16
  #
17
  # The 'docker' hostname is the alias of the service container as described at
18
  # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services.
19
  #
20
  # Note that if you're using GitLab Runner 12.7 or earlier with the Kubernetes executor and Kubernetes 1.6 or earlier,
21
  # the variable must be set to tcp://localhost:2376 because of how the
22
  # Kubernetes executor connects services to the job container
23
  # DOCKER_HOST: tcp://localhost:2376
24
  #
25
  # Specify to Docker where to create the certificates, Docker will
26
  # create them automatically on boot, and will create
27
  # `/certs/client` that will be shared between the service and job
28
  # container, thanks to volume mount from config.toml
29
  DOCKER_TLS_CERTDIR: "/certs"
30

    
31
before_script:
32
  - docker info
33

    
34
build:
35
  stage: build
36
#  only:
37
#    refs:
38
#      - master
39
  script:
40
    - docker build -t kaplicky .
41

    
42
unit_test:
43
  stage: test
44
#  only:
45
#    refs:
46
#      - master
47
  script:
48
    - cp .env.example .env
49
    - composer install
50
    - php artisan key:generate
51
    - php artisan migrate
52
    - vendor/bin/phpunit
(5-5/16)