Newer
Older
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
stages:
- test
- build
## Cache composer packages between all jobs and all branches
## of this project...
cache:
key: one-key-to-rull-them-all
paths:
- composer-cache/
before_script:
- cp env.gitlab-ci .env
- touch storage/app/db.sqlite
- COMPOSER_CACHE_DIR=composer-cache composer install
- php artisan key:generate
- php artisan migrate
# Test with PHP7.4
test:php74:
image: cylab/php74
stage: test
script:
- vendor/bin/phpunit --coverage-text --colors=never --coverage-html build/coverage
- vendor/bin/phpcs
artifacts:
paths:
- build/
expire_in: 1 month
build:
image: docker:19.03.1
stage: build
tags:
- dind
services:
- docker:19.03.1-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker info
script:
- docker build -t cylab/ctf .
build:tagged:
only:
- tags
image: docker:19.03.1
stage: build
tags:
- dind
services:
- docker:19.03.1-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker info
script:
- docker build -t cylab/mark-web:$CI_COMMIT_TAG .
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker push cylab/mark-web:$CI_COMMIT_TAG
- docker push cylab/mark-web:latest