[wip] events
This commit is contained in:
parent
ed8319f727
commit
e70764e63d
|
@ -9,6 +9,9 @@ pipeline:
|
|||
image: gitnet.fr/deblan/timeout:latest
|
||||
commands:
|
||||
- /bin/timeout -t 30 -v -c 'while true; do nc -z -v db 3306 2>&1 | grep succeeded && exit 0; sleep 0.5; done'
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
db-create:
|
||||
image: mariadb:10.3
|
||||
|
@ -17,6 +20,7 @@ pipeline:
|
|||
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
||||
- eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
app-config:
|
||||
|
@ -26,6 +30,7 @@ pipeline:
|
|||
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
||||
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
php-composer:
|
||||
|
@ -33,6 +38,8 @@ pipeline:
|
|||
commands:
|
||||
- apt-get update && apt-get -y install git
|
||||
- composer install --no-scripts
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
db-migrate:
|
||||
image: deblan/php:8.1
|
||||
|
@ -41,6 +48,7 @@ pipeline:
|
|||
commands:
|
||||
- ./bin/doctrine-migrate
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
app-jsroutes:
|
||||
|
@ -48,6 +56,7 @@ pipeline:
|
|||
commands:
|
||||
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
node-build:
|
||||
|
@ -65,6 +74,7 @@ pipeline:
|
|||
- test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
|
||||
- npm run build
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
security-check:
|
||||
|
@ -73,15 +83,17 @@ pipeline:
|
|||
- osv-detector composer.lock yarn.lock
|
||||
failure: ignore
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
build_cache:
|
||||
cache-build:
|
||||
image: deblan/php:8.1
|
||||
volumes: *volumes
|
||||
commands:
|
||||
- cd /data/deblan/deblan.io-murph/
|
||||
- mv "$CI_WORKSPACE" "$CI_COMMIT_SHA"
|
||||
when:
|
||||
event: [push, pull_request, tag, manual]
|
||||
branch: [master, master-*, develop, develop-*, feature/*]
|
||||
|
||||
app-deploy:
|
||||
|
@ -103,6 +115,16 @@ pipeline:
|
|||
when:
|
||||
event: [deployment]
|
||||
|
||||
cache-clean:
|
||||
image: deblan/php:8.1
|
||||
volumes: *volumes
|
||||
commands:
|
||||
- cd /data/deblan/deblan.io-murph/
|
||||
- rm * -frv
|
||||
when:
|
||||
event: cron
|
||||
cron: cache-clean
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.3
|
||||
|
|
Loading…
Reference in a new issue