You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
herbarium/.drone.yml

75 lines
1.9 KiB

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/*