forked from shopware/development
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
71 lines (63 loc) · 1.76 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_TAG: shopware/development
stages:
- unit
- build
cache:
key: "Eternal static key"
paths:
- .composer
- .npm
Unit:
image: composer:1.9
stage: unit
only:
refs:
- merge_requests
- master
before_script:
- composer install --ignore-platform-reqs --no-interaction --optimize-autoloader --no-suggest --no-scripts --no-progress
- composer install --ignore-platform-reqs --no-interaction --optimize-autoloader --no-suggest --no-progress --working-dir=dev-ops/analyze
script:
- vendor/bin/phpunit
--configuration dev-ops/analyze
--log-junit build/artifacts/phpunit.junit.xml
--colors=never
artifacts:
reports:
junit: build/artifacts/phpunit.junit.xml
.base:
image: docker:18.09.7
stage: build
only:
refs:
- master
changes:
- dev-ops/docker/containers/**/*
services:
- name: docker:18.09.7-dind
alias: docker
dependencies:
- Unit
before_script:
- docker login -u $CI_REGISTRY_USER -p "$CI_REGISTRY_PASSWORD"
script:
- sed -ri -e "s!php-apache:7.2!php-apache:$PHP_VERSION!g" dev-ops/docker/containers/app/Dockerfile
- docker build -t $IMAGE_TAG:$PHP_VERSION dev-ops/docker/containers/app
- docker push $IMAGE_TAG:$PHP_VERSION
build:7.2:
extends: .base
variables:
PHP_VERSION: "7.2"
after_script:
- docker tag $IMAGE_TAG:$PHP_VERSION $IMAGE_TAG:latest
- docker push $IMAGE_TAG:latest
build:7.3:
extends: .base
variables:
PHP_VERSION: "7.3"
build:7.4:
extends: .base
variables:
PHP_VERSION: "7.4"