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
variables:
DOCKER_HOST: tcp://dockerhost:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ''
stages:
- lint
- test
- build
lint:
stage: lint
image: php:8.1-cli
before_script:
- apt-get update -y && apt-get install -y git zip unzip libzip-dev
- docker-php-ext-install zip
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
script:
- php bin/console lint:yaml config
- php bin/console lint:container
- php vendor/bin/phplint --exclude=vendor --exclude=var --no-cache -v
include:
- template: Security/SAST.gitlab-ci.yml
build_image:
image: docker
services:
- name: docker:dind
alias: dockerhost
stage: build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH -f docker/Dockerfile.prod .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH
only:
- main