Files
herbarium/.drone.yml
Bastien OLLIER ccb2b541ea add Moderation.php (#14)
Co-authored-by: bastien <bastien.ollier1@gmail.com>
Co-authored-by: clfreville2 <clement.freville2@etu.uca.fr>
Reviewed-on: https://codefirst.iut.uca.fr/git/clement.freville2/herbarium/pulls/14
Reviewed-by: Clément FRÉVILLE <clement.freville2@etu.uca.fr>
2024-06-13 08:08:46 +02:00

75 lines
1.9 KiB
YAML

kind: pipeline
name: default
type: docker
trigger:
event:
- push
steps:
- name: install
image: composer/composer:2
commands:
- composer install --no-interaction
- name: lint
image: php:8.3
commands:
- php bin/console lint:container
- php vendor/bin/phpstan analyse
depends_on:
- install
- name: test
image: php:8.3
commands:
- php bin/console make:migration
- php bin/console doctrine:migrations:migrate --no-interaction
- php bin/console doctrine:fixtures:load --no-interaction --env=test
- php bin/phpunit
depends_on:
- install
- name: docker-image
image: plugins/docker
settings:
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/clement.freville2/herbarium
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASSWORD
cache_from:
- hub.codefirst.iut.uca.fr/clement.freville2/herbarium:latest
depends_on:
- lint
- test
when:
branch:
- main
- ci/*
- name: deploy
image: hub.codefirst.iut.uca.fr/clement.freville2/codefirst-dockerproxy-clientdrone:latest
settings:
image: hub.codefirst.iut.uca.fr/clement.freville2/herbarium:latest
container: herbarium
command: create
overwrite: true
admins: clementfreville2
environment:
# Disable HTTPS redirection as it served by a reverse proxy
CODEFIRST_CLIENTDRONE_ENV_SERVER_NAME: http://codefirst.iut.uca.fr
CODEFIRST_CLIENTDRONE_ENV_CORS_ALLOW_ORIGIN: https://codefirst.iut.uca.fr
CODEFIRST_CLIENTDRONE_ENV_TRUSTED_PROXIES: REMOTE_ADDR
CODEFIRST_CLIENTDRONE_ENV_API_USER_SIGHT_ENGINE:
from_secret: API_USER_SIGHT_ENGINE
CODEFIRST_CLIENTDRONE_ENV_API_KEY_SIGHT_ENGINE:
from_secret: API_KEY_SIGHT_ENGINE
depends_on:
- docker-image
when:
branch:
- main
- ci/*