-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
67 lines (60 loc) · 1.57 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
# This is a GitLab CI configuration to build the project as a docker image
# The file is generic enough to be dropped in a project containing a working Dockerfile
# Author: Florent CHAUVEAU <florent.chauveau@gmail.com>
# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/
# do not use "latest" here, if you want this to work in the future
#image: docker:dind
stages:
- test
variables:
# fill those if you have a proxy in your environment
http_proxy: ""
https_proxy: ""
no_proxy: ""
FF_NETWORK_PER_BUILD: 1
DEPLOY_ECR_ID: $DEV_ECR_ID
DEPLOY_TYPE: "dev"
workflow:
rules:
- if: $CI_COMMIT_BRANCH == "master"
variables:
DEPLOY_ECR_ID: $PROD_ECR_ID
DEPLOY_TYPE: "prod"
- when: always
.testsTemplate:
stage: test
image: repo.dev2.commhaven.pl:19940/dop/web/translations:php-base
except:
variables:
- $CI_COMMIT_MESSAGE =~ /skip\-tests/
variables:
POSTGRES_DB: testing
POSTGRES_USER: testing
POSTGRES_PASSWORD: testing
POSTGRES_HOST_AUTH_METHOD: trust
FF_NETWORK_PER_BUILD: 1
services:
- name: postgres:14
alias: bankcat_db
before_script:
- cp .env.gitlab .env
- cp .env.gitlab .env.testing
- composer install --no-interaction
script:
- ./vendor/bin/phpunit --log-junit phpunit-report.xml
artifacts:
reports:
junit: phpunit-report.xml
tests_prod:
extends: .testsTemplate
tags:
- prod-runner-docker
only:
- main
- master
tests_dev:
extends: .testsTemplate
tags:
- dev-runner-docker
only:
- development